Mercurial > hg > octave-lojdl
changeset 10137:cf6a01e0e93f
Fix unrequested markers for patch objects
author | David Bateman <dbateman@free.fr> |
---|---|
date | Wed, 20 Jan 2010 03:30:06 +0100 |
parents | ee18258bc002 |
children | 805a83ecd3da |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m |
diffstat | 2 files changed, 34 insertions(+), 26 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,9 @@ 2010-01-20 David Bateman <dbateman@free.fr> + * 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".
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -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