comparison scripts/plot/draw/isocolors.m @ 19833:9fc020886ae9

maint: Clean up m-files to follow Octave coding conventions. Try to trim long lines to < 80 chars. Use '##' for single line comments. Use '(...)' around tests for if/elseif/switch/while. Abut cell indexing operator '{' next to variable. Abut array indexing operator '(' next to variable. Use space between negation operator '!' and following expression. Use two newlines between endfunction and start of %!test or %!demo code. Remove unnecessary parens grouping between short-circuit operators. Remove stray extra spaces (typos) between variables and assignment operators. Remove stray extra spaces from ends of lines.
author Rik <rik@octave.org>
date Mon, 23 Feb 2015 14:54:39 -0800
parents 00e31f316a3a
children 777f26aa8e3e
comparison
equal deleted inserted replaced
19832:a1acca0c2216 19833:9fc020886ae9
52 ## function [] = isofinish (p) 52 ## function [] = isofinish (p)
53 ## set (gca, "PlotBoxAspectRatioMode", "manual", ... 53 ## set (gca, "PlotBoxAspectRatioMode", "manual", ...
54 ## "PlotBoxAspectRatio", [1 1 1]); 54 ## "PlotBoxAspectRatio", [1 1 1]);
55 ## set (p, "FaceColor", "interp"); 55 ## set (p, "FaceColor", "interp");
56 ## ## set (p, "FaceLighting", "flat"); 56 ## ## set (p, "FaceLighting", "flat");
57 ## ## light ("Position", [1 1 5]); ## Available with JHandles 57 ## ## light ("Position", [1 1 5]); # Available with JHandles
58 ## endfunction 58 ## endfunction
59 ## 59 ##
60 ## N = 15; # Increase number of vertices in each direction 60 ## N = 15; # Increase number of vertices in each direction
61 ## iso = .4; # Change isovalue to .1 to display a sphere 61 ## iso = .4; # Change isovalue to .1 to display a sphere
62 ## lin = linspace (0, 2, N); 62 ## lin = linspace (0, 2, N);
150 else 150 else
151 new_col = __interp_cube__ (x, y, z, c, v, "values" ); 151 new_col = __interp_cube__ (x, y, z, c, v, "values" );
152 endif 152 endif
153 switch (nargout) 153 switch (nargout)
154 case 0 154 case 0
155 if (!isempty (pa)) 155 if (! isempty (pa))
156 set (pa, "FaceVertexCData", new_col); 156 set (pa, "FaceVertexCData", new_col);
157 endif 157 endif
158 case 1 158 case 1
159 varargout = {new_col}; 159 varargout = {new_col};
160 otherwise 160 otherwise