changeset 11687:7817fd1f2237 release-3-0-x

Improvements for surface plots
author kai@linux-pc
date Tue, 11 Mar 2008 22:33:02 -0400
parents 7956ecd5fa43
children e13219eaf388
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 15 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- 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  <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.
+
 	* plot/__go_draw_axes__.m: If facecolor property of a surface is
 	"none", don't use pm3d mode and set linestyle correctly. 
 
--- 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)