Mercurial > hg > octave-lyh
changeset 14230:fe65588c31b8
fill.m: Return column vector of graphics handles
* fill.m: Return column vector of graphics handles
author | Rik <octave@nomad.inbox5.com> |
---|---|
date | Wed, 18 Jan 2012 21:17:14 -0800 |
parents | 741340c02522 |
children | 6ec182c207af |
files | scripts/plot/fill.m |
diffstat | 1 files changed, 9 insertions(+), 16 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/plot/fill.m +++ b/scripts/plot/fill.m @@ -46,16 +46,16 @@ set (h, "nextplot", "add"); endif if (i == length (iargs)) - args = varargin (iargs(i):end); + args = varargin(iargs(i):end); else - args = varargin (iargs(i):iargs(i+1)-1); + args = varargin(iargs(i):iargs(i+1)-1); endif newplot (); [tmp, fail] = __patch__ (h, args{:}); if (fail) - print_usage(); + print_usage (); endif - htmp (end + 1) = tmp; + htmp(end + 1, 1) = tmp; endfor if (strncmp (nextplot, "replace", 7)) set (h, "nextplot", nextplot); @@ -74,7 +74,7 @@ iargs = []; i = 1; while (i < nargin) - iargs (end + 1) = i; + iargs(end + 1) = i; if (ischar (varargin{i}) && (strcmpi (varargin{i}, "faces") || strcmpi (varargin{i}, "vertices"))) @@ -96,17 +96,10 @@ elseif (ischar (varargin{i})) colspec = tolower (varargin{i}); collen = length (colspec); - - if (strncmp (colspec, "blue", collen) - || strncmp (colspec, "black", collen) - || strncmp (colspec, "k", collen) - || strncmp (colspec, "black", collen) - || strncmp (colspec, "red", collen) - || strncmp (colspec, "green", collen) - || strncmp (colspec, "yellow", collen) - || strncmp (colspec, "magenta", collen) - || strncmp (colspec, "cyan", collen) - || strncmp (colspec, "white", collen)) + if (any (strncmp (colspec, + {"blue", "black", "k", "red", "green", ... + "yellow", "magenta", "cyan", "white"}, + collen))) i++; break; endif