Mercurial > hg > octave-lyh
diff scripts/plot/private/__patch__.m @ 11187:0a8e554494c9
__patch__.m: Don't index an empty array; bug introduced by changeset 11175.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Wed, 03 Nov 2010 18:02:03 +0800 |
parents | 131d56b6d9a3 |
children | 4cb1522e4d0f |
line wrap: on
line diff
--- a/scripts/plot/private/__patch__.m +++ b/scripts/plot/private/__patch__.m @@ -183,13 +183,13 @@ else vert = args {idx}; endif - idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args))(end) + 1; + idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args), 1, "last") + 1; if (isempty(idx) || idx > nargs) fvc = []; else fvc = args {idx}; endif - idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args))(end) + 1; + idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args), 1, "last") + 1; if (isempty(idx) || idx > nargs) if (!isempty (fvc)) fc = "flat"; @@ -227,7 +227,7 @@ reshape (fvc(idx, 2), size(idx)), reshape (fvc(idx, 3), size(idx))); else - c = reshape (fvc(idx), size(idx)); + c = []; endif endif args = {"xdata", x, "ydata", y, "zdata", z, "cdata", c, args{:}};