# HG changeset patch # User David Bateman # Date 1239736944 -7200 # Node ID 308311b642b2be2c4e171e15b9e8f35ea4615975 # Parent efac34f78ea49fe3bc624dfc1dd04e5262e95408 Explicitly set the default facecolor of patches diff -r efac34f78ea4 -r 308311b642b2 scripts/ChangeLog --- a/scripts/ChangeLog Tue Apr 14 07:54:38 2009 +0200 +++ b/scripts/ChangeLog Tue Apr 14 21:22:24 2009 +0200 @@ -1,3 +1,7 @@ +2009-04-11 David Bateman + + * plot/__patch__.m: Set default facecolor to [0,1,0]. + 2009-04-12 Aravindh Krishnamoorthy * special-matrix/hadamard.m: Fix a documentation mistake. diff -r efac34f78ea4 -r 308311b642b2 scripts/plot/__patch__.m --- a/scripts/plot/__patch__.m Tue Apr 14 07:54:38 2009 +0200 +++ b/scripts/plot/__patch__.m Tue Apr 14 21:22:24 2009 +0200 @@ -177,18 +177,23 @@ else vert = args {idx}; endif - idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1; - if (isempty(idx) || idx > nargs) - fc = "flat"; - else - fc = args {idx}; - endif idx = find (cellfun (@(x) strcmpi (x, "facevertexcdata"), args)) + 1; if (isempty(idx) || idx > nargs) fvc = []; else fvc = args {idx}; endif + idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1; + if (isempty(idx) || idx > nargs) + if (!isempty (fvc)) + fc = "flat"; + else + fc = [0, 1, 0]; + endif + args = {"facecolor", fc, args{:}}; + else + fc = args {idx}; + endif nr = size (faces, 2); nc = size (faces, 1); @@ -247,18 +252,23 @@ else z = args {idx}; endif - idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1; - if (isempty(idx) || idx > nargs) - fc = "flat"; - else - fc = args {idx}; - endif idx = find (cellfun (@(x) strcmpi (x, "cdata"), args)) + 1; if (isempty(idx) || idx > nargs) c = []; else c = args {idx}; endif + idx = find (cellfun (@(x) strcmpi (x, "facecolor"), args)) + 1; + if (isempty(idx) || idx > nargs) + if (!isempty (c)) + fc = "flat"; + else + fc = [0, 1, 0]; + endif + args = {"facecolor", fc, args{:}}; + else + fc = args {idx}; + endif [nr, nc] = size (x); if (!isempty (z))