# HG changeset patch # User David Bateman # Date 1263954606 -3600 # Node ID cf6a01e0e93fc94bf70d03294044b335f4816d5c # Parent ee18258bc00291bd7268a477e436d788fb2eb736 Fix unrequested markers for patch objects diff -r ee18258bc002 -r cf6a01e0e93f scripts/ChangeLog --- a/scripts/ChangeLog Wed Jan 20 03:09:47 2010 +0100 +++ b/scripts/ChangeLog Wed Jan 20 03:30:06 2010 +0100 @@ -1,5 +1,9 @@ 2010-01-20 David Bateman + * plot/__go_draw_axes__.m: Correct an error in drawing of patch + objects where unrequested markers were drawn. + + * plot/__go_draw_figure__.m: Also plot white foreground and background colors. * plot/plotyy.m: Set axes colors to "none". diff -r ee18258bc002 -r cf6a01e0e93f scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Wed Jan 20 03:09:47 2010 +0100 +++ b/scripts/plot/__go_draw_axes__.m Wed Jan 20 03:30:06 2010 +0100 @@ -924,10 +924,11 @@ if (isfield (obj, "markeredgecolor") && !strncmp (obj.markeredgecolor, "none", 4)) - if (facesame && (strncmp (obj.markeredgecolor, "auto", 4) - || ! isnumeric (obj.markeredgecolor) - || (isnumeric (obj.markeredgecolor) - && isequal (color, obj.markeredgecolor)))) + if (facesame && !isempty (pt) + && (strncmp (obj.markeredgecolor, "auto", 4) + || ! isnumeric (obj.markeredgecolor) + || (isnumeric (obj.markeredgecolor) + && isequal (color, obj.markeredgecolor)))) if (sidx == 1 && ((length (style) == 5 && strncmp (style, "lines", 5)) || isempty (style))) @@ -948,36 +949,39 @@ endif else if (!isempty (style)) - if (isempty (tmpwith{sidx})) + if (length(tmpwith) < sidx || isempty (tmpwith{sidx})) tmpwith{sidx} = sprintf ("with %s %s %s %s", style, lw, lt, colorspec); endif sidx ++; endif - if (! mono) - if (strncmp (obj.markeredgecolor, "auto", 4)) - colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"", - round (255*color)); - elseif (isnumeric (obj.markeredgecolor) && ! mono) - colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"", - round (255*obj.markeredgecolor)); + + if (!isempty (pt)) + if (! mono) + if (strncmp (obj.markeredgecolor, "auto", 4)) + colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"", + round (255*color)); + elseif (isnumeric (obj.markeredgecolor) && ! mono) + colorspec = sprintf ("lc rgb \"#%02x%02x%02x\"", + round (255*obj.markeredgecolor)); + endif endif - endif - style = "points"; - if (isfield (obj, "markersize")) - if (length (mdat) == nc) - m = mdat(i); - else - m = mdat; + style = "points"; + if (isfield (obj, "markersize")) + if (length (mdat) == nc) + m = mdat(i); + else + m = mdat; + endif + ps = sprintf("pointsize %f", m / 3); + else + ps = ""; endif - ps = sprintf("pointsize %f", m / 3); - else - ps = ""; - endif - tmpwith{sidx} = sprintf ("with %s %s %s %s %s %s", - style, lw, pt, lt, ps, - colorspec); + tmpwith{sidx} = sprintf ("with %s %s %s %s %s %s", + style, lw, pt, lt, ps, + colorspec); + endif endif endif