# HG changeset patch # User kai@linux-pc # Date 1205285540 14400 # Node ID 3ec654f16820b4dee7b92d0059c769440f9ee0fe # Parent e0d7bb35a3ec0cf994e68c50d982af2214b049d4 Improvements for surface plots diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,8 +1,14 @@ +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. + 2008-03-11 John W. Eaton * io/csread.m, io/csvwrite.m, io/dlmwrite.m: Style fixes. -2008-03-12 David Bateman +2008-03-11 David Bateman * io/dlmwrite.m, io/csvread.m, io/csvwrite.m: Files ported from octave-forge. diff --git a/scripts/plot/__go_draw_axes__.m b/scripts/plot/__go_draw_axes__.m --- a/scripts/plot/__go_draw_axes__.m +++ b/scripts/plot/__go_draw_axes__.m @@ -579,7 +579,7 @@ color = cmap(r, :); endif elseif (strncmp (obj.facecolor, "interp", 6)) - warning ("\"interp\" not supported, using 1st entry of cdata") + warning ("\"interp\" not supported, using 1st entry of cdata"); r = 1 + round ((size (cmap, 1) - 1) * ccol(1)); r = max (1, min (r, size (cmap, 1))); color = cmap(r,:); @@ -654,7 +654,7 @@ color = cmap(r, :); endif elseif (strncmp (obj.edgecolor, "interp", 6)) - warning ("\"interp\" not supported, using 1st entry of cdata") + warning ("\"interp\" not supported, using 1st entry of cdata"); r = 1 + round ((size (cmap, 1) - 1) * ccol(1)); r = max (1, min (r, size (cmap, 1))); color = cmap(r,:); @@ -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 typ = get_old_gnuplot_color (edgecol); fprintf (plot_stream, @@ -910,7 +912,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) @@ -1525,7 +1527,7 @@ endif labels = regexprep(labels, "%", "%%"); for i = 1:ntics - fprintf (plot_stream, " \"%s\" %g", labels{k++}, tics(i)) + fprintf (plot_stream, " \"%s\" %g", labels{k++}, tics(i)); if (i < ntics) fputs (plot_stream, ", "); endif diff --git a/src/ChangeLog b/src/ChangeLog --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,7 +8,7 @@ * DLD-FUNCTIONS/dlmread.cc: Style fixes. -2008-03-12 David Bateman +2008-03-11 David Bateman * DLD-FUNCTIONS/dlmread.cc: Function ported from octave forge. Add spreadsheet style ranges.