# HG changeset patch # User jwe # Date 1174944954 0 # Node ID ed17f1c8f7200dd8d8772c53a8eaedd186af8c6c # Parent fa6312d937305fcf269b09a6461ee5e6c3b22577 [project @ 2007-03-26 21:35:54 by jwe] diff -r fa6312d93730 -r ed17f1c8f720 scripts/ChangeLog --- 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 + + * plot/__go_draw_axes__.m: Always end palette data to gnuplot via + plot stream and using binary data. + 2007-03-26 John W. Eaton * plot/__plt1__.m, plot/__plt2__.m, plot/__plt2mm__.m, @@ -6,6 +11,8 @@ 2007-03-26 David Bateman + * 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. diff -r fa6312d93730 -r ed17f1c8f720 scripts/plot/__go_draw_axes__.m --- 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,