changeset 8226:50fa927b4e49

Fix for images with new gnuplot/binary transfer code
author David Bateman <dbateman@free.fr>
date Thu, 16 Oct 2008 10:57:49 +0100
parents 53202d60086f
children 586b02ac671e
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Thu Oct 16 10:39:19 2008 +0100
+++ b/scripts/ChangeLog	Thu Oct 16 10:57:49 2008 +0100
@@ -1,5 +1,9 @@
 2008-10-16  David Bateman  <dbateman@free.fr>
 
+	* plot/__go_draw_axes__.m: If current plot is an image, don't flag
+	the plot as binary, as the binary specification is already in the
+	"usingclause".
+	
 	* plot/__go_draw_figure__.m: Always use multiplot and create an 
 	enclosing axis to ensure bounding box of postscript is correct.
 
--- a/scripts/plot/__go_draw_axes__.m	Thu Oct 16 10:39:19 2008 +0100
+++ b/scripts/plot/__go_draw_axes__.m	Thu Oct 16 10:57:49 2008 +0100
@@ -1142,11 +1142,21 @@
 	  fprintf (plot_stream, "set view %.15g, %.15g;\n", rot_x, rot_z);
 	endif
       endif
-      fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n", plot_cmd,
-	       usingclause{1}, titlespec{1}, withclause{1});
+      if (is_image_data (1))
+	fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd,
+		 usingclause{1}, titlespec{1}, withclause{1});
+      else
+	fprintf (plot_stream, "%s \"-\" binary format='%%float64' %s %s %s \\\n", plot_cmd,
+		 usingclause{1}, titlespec{1}, withclause{1});
+      endif
       for i = 2:data_idx
-	fprintf (plot_stream, ", \"-\" binary format='%%float64' %s %s %s \\\n",
-		 usingclause{i}, titlespec{i}, withclause{i});
+	if (is_image_data (i))
+	  fprintf (plot_stream, "%s \"-\" %s %s %s \\\n", plot_cmd,
+		   usingclause{i}, titlespec{i}, withclause{i});
+	else
+	  fprintf (plot_stream, ", \"-\" binary format='%%float64' %s %s %s \\\n",
+		   usingclause{i}, titlespec{i}, withclause{i});
+	endif
       endfor
       fputs (plot_stream, ";\n");
       for i = 1:data_idx