changeset 7582:3ec654f16820

Improvements for surface plots
author kai@linux-pc
date Tue, 11 Mar 2008 21:32:20 -0400
parents e0d7bb35a3ec
children 1d7c23e288d7
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m src/ChangeLog
diffstat 3 files changed, 22 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Tue Mar 11 21:15:59 2008 -0400
+++ b/scripts/ChangeLog	Tue Mar 11 21:32:20 2008 -0400
@@ -1,8 +1,14 @@
+2008-03-11  Kai Habel  <kai.habel@gmx.de>
+
+        * 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  <jwe@octave.org>
 
 	* io/csread.m, io/csvwrite.m, io/dlmwrite.m: Style fixes.
 
-2008-03-12  David Bateman  <dbateman@free.fr>
+2008-03-11  David Bateman  <dbateman@free.fr>
 
 	* io/dlmwrite.m, io/csvread.m, io/csvwrite.m: Files ported from
 	octave-forge.
--- a/scripts/plot/__go_draw_axes__.m	Tue Mar 11 21:15:59 2008 -0400
+++ b/scripts/plot/__go_draw_axes__.m	Tue Mar 11 21:32:20 2008 -0400
@@ -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
--- a/src/ChangeLog	Tue Mar 11 21:15:59 2008 -0400
+++ b/src/ChangeLog	Tue Mar 11 21:32:20 2008 -0400
@@ -8,7 +8,7 @@
 
 	* DLD-FUNCTIONS/dlmread.cc: Style fixes.
 
-2008-03-12  David Bateman  <dbateman@free.fr>
+2008-03-11  David Bateman  <dbateman@free.fr>
 
 	* DLD-FUNCTIONS/dlmread.cc: Function ported from octave forge. Add
 	spreadsheet style ranges.