changeset 5252:3d9afb170a39

[project @ 2005-03-28 18:40:35 by jwe]
author jwe
date Mon, 28 Mar 2005 18:40:35 +0000
parents 454e3c98300d
children 6b91c98e3db0
files scripts/ChangeLog scripts/plot/__axis_label__.m scripts/plot/axis.m scripts/plot/bottom_title.m scripts/plot/contour.m scripts/plot/errorbar.m scripts/plot/figure.m scripts/plot/grid.m scripts/plot/loglog.m scripts/plot/loglogerr.m scripts/plot/mesh.m scripts/plot/mplot.m scripts/plot/multiplot.m scripts/plot/oneplot.m scripts/plot/plot.m scripts/plot/plot_border.m scripts/plot/polar.m scripts/plot/semilogx.m scripts/plot/semilogxerr.m scripts/plot/semilogy.m scripts/plot/semilogyerr.m scripts/plot/shg.m scripts/plot/subplot.m scripts/plot/subwindow.m scripts/plot/title.m scripts/plot/top_title.m
diffstat 26 files changed, 155 insertions(+), 135 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/ChangeLog	Mon Mar 28 18:40:35 2005 +0000
@@ -1,5 +1,25 @@
+2005-03-28  John W. Eaton  <jwe@octave.org>
+
+	* 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  <dasergatskov@gmail.com>
 
+	* 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  <jwe@octave.org>
--- a/scripts/plot/__axis_label__.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/__axis_label__.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/axis.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/axis.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/bottom_title.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/bottom_title.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/contour.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/contour.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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");
--- a/scripts/plot/errorbar.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/errorbar.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/figure.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/figure.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/grid.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/grid.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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);
--- a/scripts/plot/loglog.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/loglog.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/loglogerr.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/loglogerr.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/mesh.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/mesh.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/mplot.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/mplot.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
 
--- a/scripts/plot/multiplot.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/multiplot.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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;
--- a/scripts/plot/oneplot.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/oneplot.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/plot.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/plot.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/plot_border.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/plot_border.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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)
--- a/scripts/plot/polar.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/polar.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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))
--- a/scripts/plot/semilogx.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/semilogx.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/semilogxerr.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/semilogxerr.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/semilogy.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/semilogy.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/semilogyerr.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/semilogyerr.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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{:});
 
--- a/scripts/plot/shg.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/shg.m	Mon Mar 28 18:40:35 2005 +0000
@@ -36,6 +36,6 @@
     warning ("shg: ignoring extra arguments");
   endif
 
-  replot ();
+  replot (); 
 
 endfunction
--- a/scripts/plot/subplot.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/subplot.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
 
--- a/scripts/plot/subwindow.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/subwindow.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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;
 
--- a/scripts/plot/title.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/title.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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
--- a/scripts/plot/top_title.m	Mon Mar 28 16:05:51 2005 +0000
+++ b/scripts/plot/top_title.m	Mon Mar 28 18:40:35 2005 +0000
@@ -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