# HG changeset patch # User Ben Abbott # Date 1288778523 -28800 # Node ID 0a8e554494c9d30b5ac1ddae4265403f72679d00 # Parent f72e17e70378c907c078d60133598fd5f84c6875 __patch__.m: Don't index an empty array; bug introduced by changeset 11175. diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -15,6 +15,11 @@ 2010-11-03 Ben Abbott + * plot/private/__patch__.m: Don't index an empty array; bug introduced + by changeset 11175. + +2010-11-03 Ben Abbott + * miscellaneous/getappdata.m, miscellaneous/isappdata.m, miscellaneous/rmappdata.m, miscellaneous/setappdata.m: Add new appdata function. diff --git a/scripts/plot/private/__patch__.m b/scripts/plot/private/__patch__.m --- 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{:}};