# HG changeset patch # User kai@linux-pc # Date 1205289182 14400 # Node ID 7817fd1f2237436c054d10cb1e279e79abd8d6d5 # Parent 7956ecd5fa4385fe3cccd0a29f170e8c7df8f0b3 Improvements for surface plots diff -r 7956ecd5fa43 -r 7817fd1f2237 scripts/ChangeLog --- a/scripts/ChangeLog Wed Feb 27 22:36:23 2008 +0100 +++ b/scripts/ChangeLog Tue Mar 11 22:33:02 2008 -0400 @@ -7,6 +7,10 @@ 2008-03-11 Kai Habel + * plot/__go_draw_axes__.m: Plot surfaces in front of axes. + Allow plotting of uniform colored mesh plots with and + w/o hidden line removal. + * plot/__go_draw_axes__.m: If facecolor property of a surface is "none", don't use pm3d mode and set linestyle correctly. diff -r 7956ecd5fa43 -r 7817fd1f2237 scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m Wed Feb 27 22:36:23 2008 +0100 +++ b/scripts/plot/__go_draw_axes__.m Tue Mar 11 22:33:02 2008 -0400 @@ -867,7 +867,7 @@ data{data_idx} = zz.'; endif usingclause{data_idx} = "using ($1):($2):($3):($4)"; - ## fputs (plot_stream, "unset parametric;\n"); + ## fputs (plot_stream, "unset parametric;\n"); ## Interpolation does not work for flat surfaces (e.g. pcolor) ## and color mapping --> currently set empty. @@ -880,17 +880,14 @@ facecolor_none_or_white = (strncmp (obj.facecolor, "none", 4) || (isnumeric (obj.facecolor) && all (obj.facecolor == 1))); - if (strncmp (obj.facecolor, "none", 4)) - hidden_removal = false; - else - if (isnan (hidden_removal)) - hidden_removal = true; - endif - endif + hidden_removal = false; if (flat_interp_edge && facecolor_none_or_white) withclause{data_idx} = "with line palette"; fputs (plot_stream, "unset pm3d\n"); + if (all (obj.facecolor == 1)) + hidden_removal = true; + endif elseif (facecolor_none_or_white) edgecol = obj.edgecolor; if (have_newer_gnuplot) @@ -900,9 +897,14 @@ colorspec = sprintf ("linecolor rgb \"#%02x%02x%02x\"", round (255*edgecol)); endif + if (all (obj.facecolor == 1)) + hidden_removal = true; + endif + fputs(plot_stream,"unset pm3d;\n"); fprintf (plot_stream, "set style line %d %s lw %f;\n", data_idx, colorspec, obj.linewidth); + fputs(plot_stream,"set style increment user;\n"); else if (isequal (edgecol, [0,0,0])) typ = -1; @@ -928,7 +930,7 @@ data_idx, typ, obj.linewidth); endif withclause{data_idx} = sprintf("with line linestyle %d", data_idx); - fputs (plot_stream, "unset pm3d\n") + fputs (plot_stream, "unset pm3d\n"); endif if (have_newer_gnuplot)