# HG changeset patch # User jwe # Date 1194643726 0 # Node ID 89a929a3ebfd4378bfb4d27c9742008a5c5ef2e7 # Parent 4246642e9f48fa18cbca8a9203850056b97c41ee [project @ 2007-11-09 21:28:46 by jwe] diff -r 4246642e9f48 -r 89a929a3ebfd scripts/ChangeLog --- a/scripts/ChangeLog Fri Nov 09 21:20:07 2007 +0000 +++ b/scripts/ChangeLog Fri Nov 09 21:28:46 2007 +0000 @@ -1,6 +1,7 @@ 2007-11-09 John W. Eaton * 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, diff -r 4246642e9f48 -r 89a929a3ebfd scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Fri Nov 09 21:20:07 2007 +0000 +++ b/scripts/plot/__go_draw_axes__.m Fri Nov 09 21:28:46 2007 +0000 @@ -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