changeset 6461:ed17f1c8f720

[project @ 2007-03-26 21:35:54 by jwe]
author jwe
date Mon, 26 Mar 2007 21:35:54 +0000
parents fa6312d93730
children 75db909a53cc
files scripts/ChangeLog scripts/plot/__go_draw_axes__.m
diffstat 2 files changed, 13 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Mar 26 21:23:00 2007 +0000
+++ b/scripts/ChangeLog	Mon Mar 26 21:35:54 2007 +0000
@@ -1,3 +1,8 @@
+2007-03-26  Daniel J Sebald  <daniel.sebald@ieee.org>
+
+	* plot/__go_draw_axes__.m: Always end palette data to gnuplot via
+	plot stream and using binary data.
+
 2007-03-26  John W. Eaton  <jwe@octave.org>
 
 	* plot/__plt1__.m, plot/__plt2__.m, plot/__plt2mm__.m,
@@ -6,6 +11,8 @@
 
 2007-03-26  David Bateman  <dbateman@free.fr>
 
+	* plot/__go_draw_axes__.m: Send "set ticslevel 0" to plot stream.
+
 	* plot/plot3.m: Handle line properties.
 	* plot/plot.m: Update docstring.
 	* plot/__plotopt__.m, plot/__pltopt1__.m: New arg, err_on_invalid.
--- a/scripts/plot/__go_draw_axes__.m	Mon Mar 26 21:23:00 2007 +0000
+++ b/scripts/plot/__go_draw_axes__.m	Mon Mar 26 21:35:54 2007 +0000
@@ -311,24 +311,11 @@
 		fprintf (plot_stream,
 			 "set palette positive color model RGB maxcolors %i;\n",
 			 palette_size);
-		if (palette_size <= 128)
-		  ## Break up command to avoid buffer overflow.
-		  fprintf (plot_stream, "set palette file \"-\" using 1:2:3:4;\n");
-		  for i = 1:palette_size
-		    fprintf (plot_stream, "%g %g %g %g;\n",
-			     1e-3*round (1e3*[(i-1)/(palette_size-1), img_colormap(i,:)]));
-		  endfor
-		  fprintf (plot_stream, "e;\n");
-		else
-		  ## Let the file be deleted when Octave exits or
-		  ## `purge_tmp_files' is called.
-		  [cmap_fid, cmap_fname, msg] = mkstemp (fullfile (P_tmpdir, "gpimageXXXXXX"), 1);
-		  fwrite (cmap_fid, img_colormap', "float32", 0, "ieee-le");
-		  fclose (cmap_fid);
-		  fprintf (plot_stream,
-			   "set palette file \"%s\" binary record=%d using 1:2:3;\n",
-			   cmap_fname, palette_size);
-		endif
+		fprintf (plot_stream,
+			 "set palette file \"-\" binary record=%d using 1:2:3:4;\n",
+			 palette_size);
+		fwrite (plot_stream, [1:palette_size; img_colormap'],
+			"float32", 0, "ieee-le");
 	      endif
 	    endif
 	    fclose (img_fid);
@@ -669,6 +656,7 @@
 	while (rot_z < 0)
 	  rot_z += 360;
 	endwhile
+ 	fputs (plot_stream, "set ticslevel 0;\n");
 	fprintf (plot_stream, "set view %g, %g;\n", rot_x, rot_z);
       endif
       fprintf (plot_stream, "%s \"%s\" %s %s %s", plot_cmd,