diff scripts/plot/__go_draw_axes__.m @ 7582:3ec654f16820

Improvements for surface plots
author kai@linux-pc
date Tue, 11 Mar 2008 21:32:20 -0400
parents 369b16e7f04b
children 1d7c23e288d7
line wrap: on
line diff
--- 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