changeset 11686:7956ecd5fa43 release-3-0-x

If FaceColor is none don't use pm3d mode and set linestyle correctly.
author kai@linux-pc
date Wed, 27 Feb 2008 22:36:23 +0100
parents 61244c9d99b3
children 7817fd1f2237
files scripts/plot/__go_draw_axes__.m
diffstat 1 files changed, 40 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/plot/__go_draw_axes__.m
+++ b/scripts/plot/__go_draw_axes__.m
@@ -887,9 +887,48 @@
 		hidden_removal = true;
 	      endif
 	    endif
-	    
+	
             if (flat_interp_edge && facecolor_none_or_white)
 	      withclause{data_idx} = "with line palette";
+	      fputs (plot_stream, "unset pm3d\n");
+	    elseif (facecolor_none_or_white)
+	      edgecol = obj.edgecolor;
+	      if (have_newer_gnuplot)
+		if (mono)
+		  colorspec = "";
+		else
+		  colorspec = sprintf ("linecolor rgb \"#%02x%02x%02x\"",
+				 round (255*edgecol));
+		endif
+                fprintf (plot_stream,
+                         "set style line %d %s lw %f;\n",
+                         data_idx, colorspec, obj.linewidth);
+              else
+		if (isequal (edgecol, [0,0,0]))
+		  typ = -1;
+		elseif (isequal (edgecol, [1,0,0]))
+		  typ = 1;
+		elseif (isequal (edgecol, [0,1,0]))
+		  typ = 2;
+		elseif (isequal (edgecol, [0,0,1]))
+		  typ = 3;
+		elseif (isequal (edgecol, [1,0,1]))
+		  typ = 4;
+		elseif (isequal (edgecol, [0,1,1]))
+		  typ = 5;
+		elseif (isequal (edgecol, [1,1,1]))
+		  typ = -1;
+		elseif (isequal (edgecol, [1,1,0]))
+		  typ = 7;
+		else
+		  typ = -1;
+		endif
+                fprintf (plot_stream,
+                         "set style line %d lt %d lw %f;\n",
+                         data_idx, typ, obj.linewidth);
+	      endif
+	      withclause{data_idx} = sprintf("with line linestyle %d", data_idx);
+	      fputs (plot_stream, "unset pm3d\n")
             endif
 
 	    if (have_newer_gnuplot)