Mercurial > hg > octave-terminal
changeset 7154:89a929a3ebfd
[project @ 2007-11-09 21:28:46 by jwe]
author | jwe |
---|---|
date | Fri, 09 Nov 2007 21:28:46 +0000 |
parents | 4246642e9f48 |
children | 6ca57492b26e |
files | scripts/ChangeLog scripts/plot/__go_draw_axes__.m |
diffstat | 2 files changed, 10 insertions(+), 14 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,6 +1,7 @@ 2007-11-09 John W. Eaton <jwe@octave.org> * plot/__go_draw_axes__.m: Correct test for have_data. + Correct logic in setting palette data. * audio/wavread.m, control/base/__bodquist__.m, control/base/dare.m, control/base/dlqr.m, control/hinf/h2norm.m,
--- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -688,6 +688,10 @@ || strncmp (obj.facecolor, "interp", 6)); flat_interp_edge = (strncmp (obj.edgecolor, "flat", 4) || strncmp (obj.edgecolor, "interp", 6)); + + facecolor_none_or_white = (strncmp (obj.facecolor, "none", 4) + || (isnumeric (obj.facecolor) + && all (obj.facecolor == 1))); palette_data = []; if (strncmp (obj.facecolor, "none", 4)) @@ -695,27 +699,18 @@ endif if (flat_interp_face - || (flat_interp_edge - && (strncmp (obj.facecolor, "none", 4) - || (isnumeric (obj.facecolor) - && all (obj.facecolor == 1))))) + || (flat_interp_edge && facecolor_none_or_white)) palette_data = [1:rows(surf_colormap); surf_colormap']; - endif - - if (isnumeric (obj.facecolor)) + elseif (isnumeric (obj.facecolor)) palette_data = [1:2; [obj.facecolor; obj.facecolor]']; endif - - if ((strncmp (obj.facecolor, "none", 4) - || (isnumeric (obj.facecolor) - && all (obj.facecolor == 1))) - && isnumeric (obj.edgecolor)) + if (facecolor_none_or_white && isnumeric (obj.edgecolor)) palette_data = [1:2; [obj.edgecolor; obj.edgecolor]']; endif - if (strncmp (obj.facecolor, "none", 4) - || (isnumeric (obj.facecolor) && all (obj.facecolor == 1))) + if (facecolor_none_or_white) + ## Do nothing. elseif (flat_interp_face && strncmp (obj.edgecolor, "flat", 4)) fprintf (plot_stream, "set pm3d at s %s;\n", interp_str); else