# HG changeset patch # User jwe # Date 1112035235 0 # Node ID 3d9afb170a3989e77baea5e4183c4c62ff500a13 # Parent 454e3c98300d00950bcdc5ed71e456d47841b340 [project @ 2005-03-28 18:40:35 by jwe] diff --git a/scripts/ChangeLog b/scripts/ChangeLog --- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,5 +1,25 @@ +2005-03-28 John W. Eaton + + * plot/contour.m, plot/mesh.m: Continue to use __gnuplot_raw__ for + setting {no,}parametric. + * plot/figure.m: Likewise, for setting terminal type. + + * __axis_label__.m:, plot/axis.m, plot/bottom_title.m, + plot/contour.m, plot/figure.m, plot/multiplot.m, plot/mplot.m, + plot/plot_border.m, plot/subplot.m, plot/subwindow.m, + plot/title.m, plot/top_title.m: Avoid eval. + 2005-03-28 Dmitri A. Sergatskov + * plot/__axis_label__.m, plot/axis.m, plot/bottom_title.m, + plot/contour.m, plot/errorbar.m, plot/figure.m, plot/grid.m, + plot/loglogerr.m, plot/loglog.m, plot/mesh.m, plot/mplot.m, + plot/multiplot.m, plot/oneplot.m, plot/plot_border.m, plot/plot.m, + plot/polar.m, plot/semilogxerr.m, plot/semilogx.m, + plot/semilogyerr.m, plot/semilogy.m, plot/shg.m, plot/subplot.m, + plot/subwindow.m, plot/title.m, plot/top_title.m: + Use __gnuplot_raw__ instad of __gnuplot_set__. + * plot/replot.m: Use __gnuplot_replot__, not __greplot__. 2005-03-24 John W. Eaton diff --git a/scripts/plot/__axis_label__.m b/scripts/plot/__axis_label__.m --- a/scripts/plot/__axis_label__.m +++ b/scripts/plot/__axis_label__.m @@ -30,8 +30,8 @@ usage ("__axis_label__ (caller, text)"); elseif (nargin == 2) if (isstr (text)) - eval (sprintf ("__gnuplot_set__ %s \"%s\"", caller, - undo_string_escapes (undo_string_escapes (text)))); + __gnuplot_raw__ (sprintf ("set %s \"%s\";\n", caller, + undo_string_escapes (text))); if (automatic_replot) replot (); endif diff --git a/scripts/plot/axis.m b/scripts/plot/axis.m --- a/scripts/plot/axis.m +++ b/scripts/plot/axis.m @@ -129,7 +129,7 @@ if (nargin == 0) if (nargout == 0) - __gnuplot_set__ autoscale; + __gnuplot_raw__ ("set autoscale;\n"); else curr_axis = __current_axis__; endif @@ -140,95 +140,95 @@ ## 'matrix mode' to reverse the y-axis if (strcmp (ax, "ij")) - __gnuplot_set__ yrange [] reverse; + __gnuplot_raw__ ("set yrange [] reverse;\n"); elseif (strcmp (ax, "xy")) - __gnuplot_set__ yrange [] noreverse; + __gnuplot_raw__ ("set yrange [] noreverse;\n"); ## aspect ratio elseif (strcmp (ax, "image")) - __gnuplot_set__ size ratio -1; - __gnuplot_set__ autoscale; ## XXX FIXME XXX should be the same as "tight" + __gnuplot_raw__ ("set size ratio -1;\n"); + __gnuplot_raw__ ("set autoscale;\n"); ## XXX FIXME XXX should be the same as "tight" elseif (strcmp (ax, "equal")) - __gnuplot_set__ size ratio -1; + __gnuplot_raw__ ("set size ratio -1;\n"); elseif (strcmp (ax, "square")) - __gnuplot_set__ size ratio 1; + __gnuplot_raw__ ("set size ratio 1;\n"); elseif (strcmp (ax, "normal")) - __gnuplot_set__ size noratio; + __gnuplot_raw__ ("set size noratio;\n"); ## axis limits elseif (len >= 4 && strcmp (ax(1:4), "auto")) if (len > 4) - eval (sprintf ("__gnuplot_set__ autoscale %s;", ax(5:len))); + __gnuplot_raw__ (sprintf ("set autoscale %s;\n", ax(5:len))); else - __gnuplot_set__ autoscale; + __gnuplot_raw__ ("set autoscale;\n"); endif elseif (strcmp (ax, "manual")) ## fixes the axis limits, like axis(axis) should; - __gnuplot_set__ xrange [] writeback; - __gnuplot_set__ yrange [] writeback; - __gnuplot_set__ zrange [] writeback; + __gnuplot_raw__ ("set xrange [] writeback;\n"); + __gnuplot_raw__ ("set yrange [] writeback;\n"); + __gnuplot_raw__ ("set zrange [] writeback;\n"); ## XXX FIXME XXX if writeback were set in plot, no need to replot here. replot (); - __gnuplot_set__ noautoscale x; - __gnuplot_set__ noautoscale y; - __gnuplot_set__ noautoscale z; + __gnuplot_raw__ ("set noautoscale x;\n"); + __gnuplot_raw__ ("set noautoscale y;\n"); + __gnuplot_raw__ ("set noautoscale z;\n"); elseif (strcmp (ax, "tight")) ## XXX FIXME XXX if tight, plot must set ranges to limits of the ## all the data on the current plot, even if from a previous call. ## Instead, just let gnuplot do as it likes. - __gnuplot_set__ autoscale; + __gnuplot_raw__ ("set autoscale;\n"); ## tic marks elseif (strcmp (ax, "on")) - __gnuplot_set__ xtics; - __gnuplot_set__ ytics; - __gnuplot_set__ ztics; - __gnuplot_set__ format; + __gnuplot_raw__ ("set xtics;\n"); + __gnuplot_raw__ ("set ytics;\n"); + __gnuplot_raw__ ("set ztics;\n"); + __gnuplot_raw__ ("set format;\n"); elseif (strcmp (ax, "off")) - __gnuplot_set__ noxtics; - __gnuplot_set__ noytics; - __gnuplot_set__ noztics; + __gnuplot_raw__ ("set noxtics;\n"); + __gnuplot_raw__ ("set noytics;\n"); + __gnuplot_raw__ ("set noztics;\n"); elseif (strcmp (ax, "tic")) - __gnuplot_set__ xtics; - __gnuplot_set__ ytics; - __gnuplot_set__ ztics; + __gnuplot_raw__ ("set xtics;\n"); + __gnuplot_raw__ ("set ytics;\n"); + __gnuplot_raw__ ("set ztics;\n"); elseif (len > 3 && strcmp (ax(1:3), "tic")) if (any (ax == "x")) - __gnuplot_set__ xtics; + __gnuplot_raw__ ("set xtics;\n"); else - __gnuplot_set__ noxtics; + __gnuplot_raw__ ("set noxtics;\n"); endif if (any (ax == "y")) - __gnuplot_set__ ytics; + __gnuplot_raw__ ("set ytics;\n"); else - __gnuplot_set__ noytics; + __gnuplot_raw__ ("set noytics;\n"); endif if (any (ax == "z")) - __gnuplot_set__ ztics; + __gnuplot_raw__ ("set ztics;\n"); else - __gnuplot_set__ noztics; + __gnuplot_raw__ ("set noztics;\n"); endif elseif (strcmp (ax, "label")) - __gnuplot_set__ format; + __gnuplot_raw__ ("set format;\n"); elseif (strcmp (ax, "nolabel")) - __gnuplot_set__ format "\\0"; + __gnuplot_raw__ ("set format \"\\0\";\n"); elseif (len > 5 && strcmp (ax(1:5), "label")) if (any (ax == "x")) - __gnuplot_set__ format x; + __gnuplot_raw__ ("set format x;\n"); else - __gnuplot_set__ format x "\\0"; + __gnuplot_raw__ ("set format x \"\\0\";\n"); endif if (any (ax == "y")) - __gnuplot_set__ format y; + __gnuplot_raw__ ("set format y;\n"); else - __gnuplot_set__ format y "\\0"; + __gnuplot_raw__ ("set format y \"\\0\";\n"); endif if (any (ax == "z")) - __gnuplot_set__ format z; + __gnuplot_raw__ ("set format z;\n"); else - __gnuplot_set__ format z "\\0"; + __gnuplot_raw__ ("set format z \"\\0\";\n"); endif else @@ -246,15 +246,15 @@ __current_axis__ = reshape (ax, 1, len); if (len > 1) - eval (sprintf ("__gnuplot_set__ xrange [%g:%g];", ax(1), ax(2))); + __gnuplot_raw__ (sprintf ("set xrange [%g:%g];\n", ax(1), ax(2))); endif if (len > 3) - eval (sprintf ("__gnuplot_set__ yrange [%g:%g];", ax(3), ax(4))); + __gnuplot_raw__ (sprintf ("set yrange [%g:%g];\n", ax(3), ax(4))); endif if (len > 5) - eval (sprintf ("__gnuplot_set__ zrange [%g:%g];", ax(5), ax(6))); + __gnuplot_raw__ (sprintf ("set zrange [%g:%g];\n", ax(5), ax(6))); endif else diff --git a/scripts/plot/bottom_title.m b/scripts/plot/bottom_title.m --- a/scripts/plot/bottom_title.m +++ b/scripts/plot/bottom_title.m @@ -32,10 +32,10 @@ endif if (isstr (text)) - __gnuplot_set__ top_title; - __gnuplot_set__ title; - eval (sprintf ("__gnuplot_set__ bottom_title \"%s\"", - undo_string_escapes (undo_string_escapes (text)))); + __gnuplot_raw__ ("set top_title;\n"); + __gnuplot_raw__ ("set title;\n"); + __gnuplot_raw__ (sprintf ("set bottom_title \"%s\";\n", + undo_string_escapes (text))); else error ("bottom_title: text must be a string"); endif diff --git a/scripts/plot/contour.m b/scripts/plot/contour.m --- a/scripts/plot/contour.m +++ b/scripts/plot/contour.m @@ -44,23 +44,23 @@ n = y; endif if (ismatrix (z)) - __gnuplot_set__ nosurface; - __gnuplot_set__ contour; - __gnuplot_set__ cntrparam bspline; + __gnuplot_raw__ ("set nosurface;\n"); + __gnuplot_raw__ ("set contour;\n"); + __gnuplot_raw__ ("set cntrparam bspline;\n"); if (isscalar (n)) - command = sprintf ("__gnuplot_set__ cntrparam levels %d", n); + command = sprintf ("set cntrparam levels %d;\n", n); elseif (isvector (n)) tmp = sprintf ("%f", n(1)); for i = 2:length (n) tmp = sprintf ("%s, %f", tmp, n(i)); endfor - command = sprintf ("__gnuplot_set__ cntrparam levels discrete %s", tmp); + command = sprintf ("set cntrparam levels discrete %s;\n", tmp); else error ("contour: levels must be a scalar or vector") ; endif - eval (command); - __gnuplot_set__ noparametric; - __gnuplot_set__ view 0, 0, 1, 1; + __gnuplot_raw__ (command); + __gnuplot_set__ parametric; + __gnuplot_raw__ ("set view 0, 0, 1, 1;\n"); __gnuplot_splot__ z w l 1; else error ("contour: z of contour (z, levels) must be a matrix"); @@ -104,23 +104,23 @@ error (size_msg); endif endif - __gnuplot_set__ nosurface; - __gnuplot_set__ contour; - __gnuplot_set__ cntrparam bspline; + __gnuplot_raw__ ("set nosurface;\n"); + __gnuplot_raw__ ("set contour;\n"); + __gnuplot_raw__ ("set cntrparam bspline;\n"); if (isscalar (n)) - command = sprintf ("__gnuplot_set__ cntrparam levels %d", n); + command = sprintf ("set cntrparam levels %d;\n", n); elseif (isvector (n)) tmp = sprintf ("%f", n(1)); for i = 2:length (n) tmp = sprintf ("%s, %f", tmp, n(i)); endfor - command = sprintf ("__gnuplot_set__ cntrparam levels discrete %s", tmp); + command = sprintf ("set cntrparam levels discrete %s;\n", tmp); else error ("contour: levels must be a scalar or vector") ; endif - eval (command); + __gnuplot_raw__ (command); __gnuplot_set__ parametric; - __gnuplot_set__ view 0, 0, 1, 1; + __gnuplot_raw__ ("set view 0, 0, 1, 1;\n"); __gnuplot_splot__ zz w l 1; else error ("contour: x and y must be vectors and z must be a matrix"); diff --git a/scripts/plot/errorbar.m b/scripts/plot/errorbar.m --- a/scripts/plot/errorbar.m +++ b/scripts/plot/errorbar.m @@ -117,9 +117,9 @@ usage ("errorbar (...)"); endif - __gnuplot_set__ nologscale x; - __gnuplot_set__ nologscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set nologscale x;\n"); + __gnuplot_raw__ ("set nologscale y;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __errcomm__ ("errorbar", varargin{:}); diff --git a/scripts/plot/figure.m b/scripts/plot/figure.m --- a/scripts/plot/figure.m +++ b/scripts/plot/figure.m @@ -47,7 +47,7 @@ if (! isempty (gnuterm)) oneplot (); figure_list = union (figure_list, f); - eval (sprintf ("__gnuplot_set__ term %s %d\n", gnuterm, f)); + eval (sprintf ("__gnuplot_set__ term %s %d;\n", gnuterm, f)); else error ("figure: requires GNUTERM (Aqua) or DISPLAY (X11)"); endif diff --git a/scripts/plot/grid.m b/scripts/plot/grid.m --- a/scripts/plot/grid.m +++ b/scripts/plot/grid.m @@ -38,15 +38,15 @@ do_replot = false; if (nargin == 0) - __gnuplot_set__ grid; + __gnuplot_raw__ ("set grid;\n"); do_replot = true; elseif (nargin == 1) if (isstr (x)) if (strcmp ("off", x)) - __gnuplot_set__ nogrid; + __gnuplot_raw__ ("set nogrid;\n"); do_replot = true; elseif (strcmp ("on", x)) - __gnuplot_set__ grid; + __gnuplot_raw__ ("set grid"); do_replot = true; else usage (usage_msg); diff --git a/scripts/plot/loglog.m b/scripts/plot/loglog.m --- a/scripts/plot/loglog.m +++ b/scripts/plot/loglog.m @@ -35,9 +35,9 @@ ## temporarily, probably inside an unwind_protect block, but there is ## no way to determine their current values. - __gnuplot_set__ logscale x; - __gnuplot_set__ logscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set logscale x;\n"); + __gnuplot_raw__ ("logscale y;\n"); + __gnuplot_raw__ ("nopolar;\n"); __plt__ ("loglog", varargin{:}); diff --git a/scripts/plot/loglogerr.m b/scripts/plot/loglogerr.m --- a/scripts/plot/loglogerr.m +++ b/scripts/plot/loglogerr.m @@ -48,9 +48,9 @@ usage ("loglogerr(...)"); endif - __gnuplot_set__ logscale x; - __gnuplot_set__ logscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set logscale x;\n"); + __gnuplot_raw__ ("set logscale y;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __errcomm__ ("loglogerr", varargin{:}); diff --git a/scripts/plot/mesh.m b/scripts/plot/mesh.m --- a/scripts/plot/mesh.m +++ b/scripts/plot/mesh.m @@ -41,13 +41,13 @@ if (nargin == 1) z = x; if (ismatrix (z)) - __gnuplot_set__ hidden3d; - __gnuplot_set__ data style lines; - __gnuplot_set__ surface; - __gnuplot_set__ nocontour; + __gnuplot_raw__ ("set hidden3d;\n"); + __gnuplot_raw__ ("set data style lines;\n"); + __gnuplot_raw__ ("set surface;\n"); + __gnuplot_raw__ ("set nocontour;\n"); __gnuplot_set__ noparametric; - __gnuplot_set__ nologscale; - __gnuplot_set__ view 60, 30, 1, 1 + __gnuplot_raw__ ("set nologscale;\n"); + __gnuplot_raw__ ("set view 60, 30, 1, ;\n"); __gnuplot_splot__ (z'); else error ("mesh: argument must be a matrix"); @@ -69,13 +69,13 @@ zz(:,i+2) = z(:,k); k++; endfor - __gnuplot_set__ hidden3d; - __gnuplot_set__ data style lines; - __gnuplot_set__ surface; - __gnuplot_set__ nocontour; - __gnuplot_set__ nologscale; + __gnuplot_raw__ ("set hidden3d;\n"); + __gnuplot_raw__ ("set data style lines;\n"); + __gnuplot_raw__ ("set surface;\n"); + __gnuplot_raw__ ("set nocontour;\n"); + __gnuplot_raw__ ("set nologscale;\n"); __gnuplot_set__ parametric; - __gnuplot_set__ view 60, 30, 1, 1 + __gnuplot_raw__ ("set view 60, 30, 1, 1;\n"); __gnuplot_splot__ (zz); __gnuplot_set__ noparametric; else @@ -97,13 +97,13 @@ zz(:,i+2) = z(:,k); k++; endfor - __gnuplot_set__ hidden3d; - __gnuplot_set__ data style lines; - __gnuplot_set__ surface; - __gnuplot_set__ nocontour; - __gnuplot_set__ nologscale; + __gnuplot_raw__ ("set hidden3d;\n") + __gnuplot_raw__ ("set data style lines;\n"); + __gnuplot_raw__ ("set surface;\n"); + __gnuplot_raw__ ("set nocontour;\n"); + __gnuplot_raw__ ("set nologscale;\n"); __gnuplot_set__ parametric; - __gnuplot_set__ view 60, 30, 1, 1 + __gnuplot_raw__ ("set view 60, 30, 1, 1;\n"); __gnuplot_splot__ (zz); __gnuplot_set__ noparametric; else diff --git a/scripts/plot/mplot.m b/scripts/plot/mplot.m --- a/scripts/plot/mplot.m +++ b/scripts/plot/mplot.m @@ -44,8 +44,8 @@ global __multiplot_xi__; global __multiplot_yi__; - __gnuplot_set__ nologscale; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set nologscale;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __plt__ ("plot", varargin{:}); @@ -67,7 +67,7 @@ xo = (__multiplot_xi__ - 1.0) * __multiplot_xsize__; yo = (__multiplot_yn__ - __multiplot_yi__) * __multiplot_ysize__; - eval (sprintf ("__gnuplot_set__ origin %g, %g", xo, yo)); + __gnuplot_raw__ (sprintf ("set origin %g, %g;\n", xo, yo)); endif diff --git a/scripts/plot/multiplot.m b/scripts/plot/multiplot.m --- a/scripts/plot/multiplot.m +++ b/scripts/plot/multiplot.m @@ -73,17 +73,17 @@ error ("multiplot: xn and yn have to be positive integers"); endif - __gnuplot_set__ multiplot; + __gnuplot_raw__ ("set multiplot;\n"); xsize = 1.0 ./ xn; ysize = 1.0 ./ yn; - eval (sprintf ("__gnuplot_set__ size %g, %g", xsize, ysize)); + __gnuplot_raw__ (sprintf ("set size %g, %g;\n", xsize, ysize)); xo = 0.0; yo = (yn - 1.0)*ysize; - eval (sprintf ("__gnuplot_set__ origin %g, %g", xo, yo)); + __gnuplot_raw__ (sprintf ("set origin %g, %g;\n", xo, yo)); __multiplot_mode__ = 1; __multiplot_xsize__ = xsize; diff --git a/scripts/plot/oneplot.m b/scripts/plot/oneplot.m --- a/scripts/plot/oneplot.m +++ b/scripts/plot/oneplot.m @@ -31,9 +31,9 @@ global __multiplot_mode__ = 0; if (__multiplot_mode__) - __gnuplot_set__ nomultiplot; - __gnuplot_set__ size 1, 1; - __gnuplot_set__ origin 0, 0; + __gnuplot_raw__ ("set nomultiplot;\n"); + __gnuplot_raw__ ("set size 1, 1;\n"); + __gnuplot_raw__ ("set origin 0, 0;\n"); __multiplot_mode__ = 0; gnuplot_command_replot = "rep"; endif diff --git a/scripts/plot/plot.m b/scripts/plot/plot.m --- a/scripts/plot/plot.m +++ b/scripts/plot/plot.m @@ -175,8 +175,8 @@ ## temporarily, probably inside an unwind_protect block, but there is ## no way to determine their current values. - __gnuplot_set__ nologscale; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set nologscale;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __plt__ ("plot", varargin{:}); diff --git a/scripts/plot/plot_border.m b/scripts/plot/plot_border.m --- a/scripts/plot/plot_border.m +++ b/scripts/plot/plot_border.m @@ -100,14 +100,14 @@ endwhile if (none) - __gnuplot_set__ noborder; + __gnuplot_raw__ ("set noborder;\n"); else if (all) border = 15; else border = south + west + north + east; endif - eval (sprintf ("__gnuplot_set__ border %d", border)); + __gnuplot_raw__ (sprintf ("set border %d;\n", border)); endif if (automatic_replot) diff --git a/scripts/plot/polar.m b/scripts/plot/polar.m --- a/scripts/plot/polar.m +++ b/scripts/plot/polar.m @@ -36,8 +36,8 @@ ## temporarily, probably inside an unwind_protect block, but there is ## no way to determine their current values. - __gnuplot_set__ nologscale; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set nologscale;\n"); + __gnuplot_raw__ ("set nopolar;\n"); if (nargin == 3) if (isstr (fmt)) diff --git a/scripts/plot/semilogx.m b/scripts/plot/semilogx.m --- a/scripts/plot/semilogx.m +++ b/scripts/plot/semilogx.m @@ -35,9 +35,9 @@ ## temporarily, probably inside an unwind_protect block, but there is ## no way to determine their current values. - __gnuplot_set__ logscale x; - __gnuplot_set__ nologscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set logscale x;\n"); + __gnuplot_raw__ ("set nologscale y;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __plt__ ("semilogx", varargin{:}); diff --git a/scripts/plot/semilogxerr.m b/scripts/plot/semilogxerr.m --- a/scripts/plot/semilogxerr.m +++ b/scripts/plot/semilogxerr.m @@ -48,9 +48,9 @@ usage ("semilogxerr (...)"); endif - __gnuplot_set__ logscale x; - __gnuplot_set__ nologscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set logscale x;\n"); + __gnuplot_raw__ ("set nologscale y;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __errcomm__ ("semilogxerr", varargin{:}); diff --git a/scripts/plot/semilogy.m b/scripts/plot/semilogy.m --- a/scripts/plot/semilogy.m +++ b/scripts/plot/semilogy.m @@ -35,9 +35,9 @@ ## temporarily, probably inside an unwind_protect block, but there is ## no way to determine their current values. - __gnuplot_set__ nologscale x; - __gnuplot_set__ logscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set nologscale x;\n"); + __gnuplot_raw__ ("set logscale y;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __plt__ ("semilogy", varargin{:}); diff --git a/scripts/plot/semilogyerr.m b/scripts/plot/semilogyerr.m --- a/scripts/plot/semilogyerr.m +++ b/scripts/plot/semilogyerr.m @@ -48,9 +48,9 @@ usage ("semilogyerr (...)"); endif - __gnuplot_set__ nologscale x; - __gnuplot_set__ logscale y; - __gnuplot_set__ nopolar; + __gnuplot_raw__ ("set nologscale x;\n"); + __gnuplot_raw__ ("set logscale y;\n"); + __gnuplot_raw__ ("set nopolar;\n"); __errcomm__ ("semilogyerr", varargin{:}); diff --git a/scripts/plot/shg.m b/scripts/plot/shg.m --- a/scripts/plot/shg.m +++ b/scripts/plot/shg.m @@ -36,6 +36,6 @@ warning ("shg: ignoring extra arguments"); endif - replot (); + replot (); endfunction diff --git a/scripts/plot/subplot.m b/scripts/plot/subplot.m --- a/scripts/plot/subplot.m +++ b/scripts/plot/subplot.m @@ -157,10 +157,10 @@ gnuplot_command_replot = "cle;rep"; - __gnuplot_set__ multiplot; + __gnuplot_raw__ ("set multiplot;\n"); - eval (sprintf ("__gnuplot_set__ size %g, %g", __multiplot_xsize__, - __multiplot_ysize__)); + __gnuplot_raw__ (sprintf ("set size %g, %g;\n", + __multiplot_xsize__, __multiplot_ysize__)); endif ## get the sub plot location @@ -175,7 +175,7 @@ xo = (xp - 1.0) * __multiplot_xsize__; yo = (rows - yp) * __multiplot_ysize__; - eval (sprintf ("__gnuplot_set__ origin %g, %g", xo, yo)); + __gnuplot_raw__ (sprintf ("set origin %g, %g;\n", xo, yo)); endif diff --git a/scripts/plot/subwindow.m b/scripts/plot/subwindow.m --- a/scripts/plot/subwindow.m +++ b/scripts/plot/subwindow.m @@ -71,7 +71,7 @@ xo = (xn - 1.0) * __multiplot_xsize__; yo = (__multiplot_yn__ - yn) * __multiplot_ysize__; - eval (sprintf ("__gnuplot_set__ origin %g, %g", xo, yo)); + __gnuplot_raw__ (sprintf ("set origin %g, %g;\n", xo, yo)); clearplot; diff --git a/scripts/plot/title.m b/scripts/plot/title.m --- a/scripts/plot/title.m +++ b/scripts/plot/title.m @@ -34,8 +34,8 @@ endif if (isstr (text)) - eval (sprintf ("__gnuplot_set__ title \"%s\"", - undo_string_escapes (undo_string_escapes (text)))); + __gnuplot_raw__ (sprintf ("set title \"%s\";\n", + undo_string_escapes (text))); if (automatic_replot) replot (); endif diff --git a/scripts/plot/top_title.m b/scripts/plot/top_title.m --- a/scripts/plot/top_title.m +++ b/scripts/plot/top_title.m @@ -34,10 +34,10 @@ endif if (isstr (text)) - __gnuplot_set__ bottom_title; - __gnuplot_set__ title; - eval (sprintf ("__gnuplot_set__ top_title \"%s\"", - undo_string_escapes (undo_string_escapes (text)))); + __gnuplot_raw__ ("set bottom_title;\n") + __gnuplot_raw__ ("set title;\n") + __gnuplot_raw__ (sprintf ("set top_title \"%s\";\n", + undo_string_escapes (text))); if (automatic_replot) replot (); endif