changeset 5214:eecc24b92d97

[project @ 2005-03-16 17:14:12 by jwe]
author jwe
date Wed, 16 Mar 2005 17:14:12 +0000
parents 390f13fc0f4a
children 32c569794216
files scripts/ChangeLog scripts/plot/__axis_label__.m scripts/plot/__errplot__.m scripts/plot/__plt__.m scripts/plot/axis.m scripts/plot/bar.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/meshgrid.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/replot.m scripts/plot/semilogx.m scripts/plot/semilogxerr.m scripts/plot/semilogy.m scripts/plot/semilogyerr.m scripts/plot/shg.m scripts/plot/stairs.m scripts/plot/subplot.m scripts/plot/subwindow.m scripts/plot/title.m scripts/plot/top_title.m scripts/plot/xlabel.m
diffstat 33 files changed, 222 insertions(+), 170 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,18 @@
+2005-03-16  John W. Eaton  <jwe@octave.org>
+
+	* __axis_label__.m, __errplot__.m, __plt__.m, axis.m, bar.m,
+	bottom_title.m, contour.m, errorbar.m, figure.m, grid.m, loglog.m,
+	loglogerr.m, mesh.m, meshgrid.m, mplot.m, multiplot.m, oneplot.m,
+	plot.m, plot_border.m, polar.m, semilogx.m, semilogxerr.m,
+	semilogy.m, semilogyerr.m, shg.m, stairs.m, subplot.m,
+	subwindow.m, title.m, top_title.m, xlabel.m: Use __gplot__ instead
+	of gplot, __gsplot__ instead of gsplot, __gset__ instead of gset.
+	Remove gplot, gsplot from @seealso docs.
+
+2005-03-16  John W. Eaton  <jwe@octave.org>
+
+	* plot/replot.m: New file.
+
 2005-03-15  David Bateman  <dbateman@free.fr>
 
 	* set/unique.m, set/ismember.m: Handle cell arrays.
--- a/scripts/plot/__axis_label__.m
+++ b/scripts/plot/__axis_label__.m
@@ -30,10 +30,10 @@
     usage ("__axis_label__ (caller, text)");
   elseif (nargin == 2)
     if (isstr (text))
-      eval (sprintf ("gset %s \"%s\"", caller,
+      eval (sprintf ("__gset__ %s \"%s\"", caller,
 		     undo_string_escapes (undo_string_escapes (text))));
       if (automatic_replot)
-	replot
+	replot ();
       endif
     else
       error ("%s: text must be a string", caller);
--- a/scripts/plot/__errplot__.m
+++ b/scripts/plot/__errplot__.m
@@ -28,7 +28,7 @@
 ## @end deftypefn
 ##
 ## @seealso{semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__
-## bar, stairs, errorbar, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, errorbar, replot, xlabel, ylabel, and title}
 
 ## Created: 18.7.2000
 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi>
@@ -67,7 +67,7 @@
 	       a1(:,i)-a3(:,i), a1(:,i)+a4(:,i), ...
 	       a2(:,i)-a5(:,i), a2(:,i)+a6(:,i)];
     endswitch
-    cmd = sprintf ("gplot tmp %s", ifmt);
+    cmd = sprintf ("__gplot__ tmp %s", ifmt);
     eval (cmd);
 endfor
 
--- a/scripts/plot/__plt__.m
+++ b/scripts/plot/__plt__.m
@@ -36,7 +36,7 @@
     y_set = false;
     have_gp_cmd = false;
 
-    gp_cmd = "gplot";
+    gp_cmd = "__gplot__";
     sep = "";
 
     ## Gather arguments, decode format, gather plot strings, and plot lines.
--- a/scripts/plot/axis.m
+++ b/scripts/plot/axis.m
@@ -129,7 +129,7 @@
 
   if (nargin == 0)
     if (nargout == 0)
-      gset autoscale;
+      __gset__ autoscale;
     else
       curr_axis = __current_axis__;
     endif
@@ -140,95 +140,95 @@
 
     ## 'matrix mode' to reverse the y-axis
     if (strcmp (ax, "ij"))
-      gset yrange [] reverse; 
+      __gset__ yrange [] reverse; 
     elseif (strcmp (ax, "xy"))
-      gset yrange [] noreverse;
+      __gset__ yrange [] noreverse;
 
       ## aspect ratio
     elseif (strcmp (ax, "image"))
-      gset size ratio -1; 
-      gset autoscale; ## XXX FIXME XXX should be the same as "tight"
+      __gset__ size ratio -1; 
+      __gset__ autoscale; ## XXX FIXME XXX should be the same as "tight"
     elseif (strcmp (ax, "equal"))
-      gset size ratio -1;
+      __gset__ size ratio -1;
     elseif (strcmp (ax, "square"))
-      gset size ratio 1;
+      __gset__ size ratio 1;
     elseif (strcmp (ax, "normal"))
-      gset size noratio;
+      __gset__ size noratio;
 
 
       ## axis limits
     elseif (len >= 4 && strcmp (ax(1:4), "auto"))
       if (len > 4)
-      	eval (sprintf ("gset autoscale %s;", ax(5:len)));
+      	eval (sprintf ("__gset__ autoscale %s;", ax(5:len)));
       else
-	gset autoscale;
+	__gset__ autoscale;
       endif
     elseif (strcmp (ax, "manual"))
       ## fixes the axis limits, like axis(axis) should;
-      gset xrange [] writeback;
-      gset yrange [] writeback;
-      gset zrange [] writeback;
+      __gset__ xrange [] writeback;
+      __gset__ yrange [] writeback;
+      __gset__ zrange [] writeback;
       ## XXX FIXME XXX if writeback were set in plot, no need to replot here.
-      replot
-      gset noautoscale x;
-      gset noautoscale y;
-      gset noautoscale z;
+      replot ();
+      __gset__ noautoscale x;
+      __gset__ noautoscale y;
+      __gset__ noautoscale z;
     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.
-      gset autoscale;
+      __gset__ autoscale;
 
 
       ## tic marks
     elseif (strcmp (ax, "on"))
-      gset xtics;
-      gset ytics;
-      gset ztics;
-      gset format;
+      __gset__ xtics;
+      __gset__ ytics;
+      __gset__ ztics;
+      __gset__ format;
     elseif (strcmp (ax, "off"))
-      gset noxtics;
-      gset noytics;
-      gset noztics;
+      __gset__ noxtics;
+      __gset__ noytics;
+      __gset__ noztics;
     elseif (strcmp (ax, "tic"))
-      gset xtics;
-      gset ytics;
-      gset ztics;
+      __gset__ xtics;
+      __gset__ ytics;
+      __gset__ ztics;
     elseif (len > 3 && strcmp (ax(1:3), "tic"))
       if (any (ax == "x"))
-	gset xtics;
+	__gset__ xtics;
       else
-	gset noxtics;
+	__gset__ noxtics;
       endif
       if (any (ax == "y"))
-	gset ytics;
+	__gset__ ytics;
       else
-	gset noytics;
+	__gset__ noytics;
       endif
       if (any (ax == "z"))
-	gset ztics;
+	__gset__ ztics;
       else
-	gset noztics;
+	__gset__ noztics;
       endif
     elseif (strcmp (ax, "label"))
-      gset format;
+      __gset__ format;
     elseif (strcmp (ax, "nolabel"))
-      gset format "\\0";
+      __gset__ format "\\0";
     elseif (len > 5 && strcmp (ax(1:5), "label"))
       if (any (ax == "x"))
-	gset format x;
+	__gset__ format x;
       else
-	gset format x "\\0";
+	__gset__ format x "\\0";
       endif
       if (any (ax == "y"))
-	gset format y;
+	__gset__ format y;
       else
-	gset format y "\\0";
+	__gset__ format y "\\0";
       endif
       if (any (ax == "z"))
-	gset format z;
+	__gset__ format z;
       else
-	gset format z "\\0";
+	__gset__ format z "\\0";
       endif
 
     else
@@ -246,15 +246,15 @@
     __current_axis__ = reshape (ax, 1, len);
 
     if (len > 1)
-      eval (sprintf ("gset xrange [%g:%g];", ax(1), ax(2)));
+      eval (sprintf ("__gset__ xrange [%g:%g];", ax(1), ax(2)));
     endif
 
     if (len > 3)
-      eval (sprintf ("gset yrange [%g:%g];", ax(3), ax(4)));
+      eval (sprintf ("__gset__ yrange [%g:%g];", ax(3), ax(4)));
     endif
 
     if (len > 5)
-      eval (sprintf ("gset zrange [%g:%g];", ax(5), ax(6)));
+      eval (sprintf ("__gset__ zrange [%g:%g];", ax(5), ax(6)));
     endif
 
   else
@@ -264,7 +264,7 @@
   if (nargin > 1)
     axis (varargin{:});
   elseif (automatic_replot)
-    replot
+    replot ();
   endif
 endfunction
 
--- a/scripts/plot/bar.m
+++ b/scripts/plot/bar.m
@@ -44,7 +44,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## stairs, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
--- a/scripts/plot/bottom_title.m
+++ b/scripts/plot/bottom_title.m
@@ -32,9 +32,9 @@
   endif
 
   if (isstr (text))
-    gset top_title;
-    gset title;
-    eval (sprintf ("gset bottom_title \"%s\"",
+    __gset__ top_title;
+    __gset__ title;
+    eval (sprintf ("__gset__ bottom_title \"%s\"",
 		   undo_string_escapes (undo_string_escapes (text))));
   else
     error ("bottom_title: text must be a string");
--- a/scripts/plot/contour.m
+++ b/scripts/plot/contour.m
@@ -26,7 +26,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -44,24 +44,24 @@
       n = y; 
     endif
     if (ismatrix (z))
-      gset nosurface;
-      gset contour;
-      gset cntrparam bspline;
+      __gset__ nosurface;
+      __gset__ contour;
+      __gset__ cntrparam bspline;
       if (isscalar (n))
-        command = sprintf ("gset cntrparam levels %d", n);
+        command = sprintf ("__gset__ cntrparam levels %d", n);
       elseif (isvector (n))
         tmp = sprintf ("%f", n(1));
         for i = 2:length (n)
           tmp = sprintf ("%s, %f", tmp, n(i));
         endfor
-        command = sprintf ("gset cntrparam levels discrete %s", tmp);
+        command = sprintf ("__gset__ cntrparam levels discrete %s", tmp);
       else
 	error ("contour: levels must be a scalar or vector") ;
       endif
       eval (command);
-      gset noparametric;
-      gset view 0, 0, 1, 1;
-      gsplot z w l 1;
+      __gset__ noparametric;
+      __gset__ view 0, 0, 1, 1;
+      __gsplot__ z w l 1;
     else
       error ("contour: z of contour (z, levels) must be a matrix");
     endif
@@ -104,24 +104,24 @@
 	  error (size_msg);
 	endif
       endif
-      gset nosurface;
-      gset contour;
-      gset cntrparam bspline;
+      __gset__ nosurface;
+      __gset__ contour;
+      __gset__ cntrparam bspline;
       if (isscalar (n))
-        command = sprintf ("gset cntrparam levels %d", n);
+        command = sprintf ("__gset__ cntrparam levels %d", n);
       elseif (isvector (n))
         tmp = sprintf ("%f", n(1));
         for i = 2:length (n)
           tmp = sprintf ("%s, %f", tmp, n(i));
         endfor
-        command = sprintf ("gset cntrparam levels discrete %s", tmp);
+        command = sprintf ("__gset__ cntrparam levels discrete %s", tmp);
       else
 	error ("contour: levels must be a scalar or vector") ;
       endif
       eval (command);
-      gset parametric;
-      gset view 0, 0, 1, 1;
-      gsplot zz w l 1;
+      __gset__ parametric;
+      __gset__ view 0, 0, 1, 1;
+      __gsplot__ zz w l 1;
     else
       error ("contour: x and y must be vectors and z must be a matrix");
     endif
--- a/scripts/plot/errorbar.m
+++ b/scripts/plot/errorbar.m
@@ -105,7 +105,7 @@
 ## @end deftypefn
 ##
 ## @seealso{semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__,
-## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Created: 18.7.2000
 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi>
@@ -117,9 +117,9 @@
     usage ("errorbar (...)");
   endif
 
-  gset nologscale x;
-  gset nologscale y;
-  gset nopolar;
+  __gset__ nologscale x;
+  __gset__ nologscale y;
+  __gset__ nopolar;
 
   __errcomm__ ("errorbar", varargin{:});
 
--- 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 ("gset term %s %d\n", gnuterm, f));
+        eval (sprintf ("__gset__ term %s %d\n", gnuterm, f));
       else
         error ("figure: requires GNUTERM (Aqua) or DISPLAY (X11)");
       endif
--- a/scripts/plot/grid.m
+++ b/scripts/plot/grid.m
@@ -25,7 +25,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -38,15 +38,15 @@
   do_replot = false;
 
   if (nargin == 0)
-    gset grid;
+    __gset__ grid;
     do_replot = true;
   elseif (nargin == 1)
     if (isstr (x))
       if (strcmp ("off", x))
-        gset nogrid;
+        __gset__ nogrid;
 	do_replot = true;
       elseif (strcmp ("on", x))
-        gset grid;
+        __gset__ grid;
 	do_replot = true;
       else
 	usage (usage_msg);
@@ -59,7 +59,7 @@
   endif
 
   if (do_replot && automatic_replot)
-    replot
+    replot ();
   endif
 
 endfunction
--- a/scripts/plot/loglog.m
+++ b/scripts/plot/loglog.m
@@ -25,7 +25,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogy, loglog, polar, mesh, contour, bar, stairs,
-## gplot, gsplot, replot, xlabel, ylabel, and title}
+## replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -35,9 +35,9 @@
   ## temporarily, probably inside an unwind_protect block, but there is
   ## no way to determine their current values.
 
-  gset logscale x;
-  gset logscale y;
-  gset nopolar;
+  __gset__ logscale x;
+  __gset__ logscale y;
+  __gset__ nopolar;
 
   __plt__ ("loglog", varargin{:});
 
--- a/scripts/plot/loglogerr.m
+++ b/scripts/plot/loglogerr.m
@@ -36,7 +36,7 @@
 ## @end deftypefn
 ##
 ## @seealso{errorbar, semilogxerr, semilogyerr, polar, mesh, contour, 
-## __pltopt__, bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## __pltopt__, bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Created: 20.2.2001
 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi>
@@ -48,9 +48,9 @@
     usage ("loglogerr(...)");
   endif
 
-  gset logscale x;
-  gset logscale y;
-  gset nopolar;
+  __gset__ logscale x;
+  __gset__ logscale y;
+  __gset__ nopolar;
 
   __errcomm__ ("loglogerr", varargin{:});
 
--- a/scripts/plot/mesh.m
+++ b/scripts/plot/mesh.m
@@ -28,7 +28,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, meshgrid, meshdom,
-## contour, bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## contour, bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -41,14 +41,14 @@
   if (nargin == 1)
     z = x;
     if (ismatrix (z))
-      gset hidden3d;
-      gset data style lines;
-      gset surface;
-      gset nocontour;
-      gset noparametric;
-      gset nologscale;
-      gset view 60, 30, 1, 1
-      gsplot (z');
+      __gset__ hidden3d;
+      __gset__ data style lines;
+      __gset__ surface;
+      __gset__ nocontour;
+      __gset__ noparametric;
+      __gset__ nologscale;
+      __gset__ view 60, 30, 1, 1
+      __gsplot__ (z');
     else
       error ("mesh: argument must be a matrix");
     endif
@@ -69,15 +69,15 @@
           zz(:,i+2) = z(:,k);
           k++;
         endfor
-        gset hidden3d;
-        gset data style lines;
-        gset surface;
-        gset nocontour;
-        gset nologscale;
-        gset parametric;
-        gset view 60, 30, 1, 1
-        gsplot (zz);
-        gset noparametric;
+        __gset__ hidden3d;
+        __gset__ data style lines;
+        __gset__ surface;
+        __gset__ nocontour;
+        __gset__ nologscale;
+        __gset__ parametric;
+        __gset__ view 60, 30, 1, 1
+        __gsplot__ (zz);
+        __gset__ noparametric;
       else
         msg = "mesh: rows (z) must be the same as length (y) and";
         msg = sprintf ("%s\ncolumns (z) must be the same as length (x)", msg);
@@ -97,15 +97,15 @@
           zz(:,i+2) = z(:,k);
           k++;
         endfor
-        gset hidden3d;
-        gset data style lines;
-        gset surface;
-        gset nocontour;
-        gset nologscale;
-        gset parametric;
-        gset view 60, 30, 1, 1
-        gsplot (zz);
-        gset noparametric;
+        __gset__ hidden3d;
+        __gset__ data style lines;
+        __gset__ surface;
+        __gset__ nocontour;
+        __gset__ nologscale;
+        __gset__ parametric;
+        __gset__ view 60, 30, 1, 1
+        __gsplot__ (zz);
+        __gset__ noparametric;
       else
         error ("mesh: x, y, and z must have same dimensions");
       endif
--- a/scripts/plot/meshgrid.m
+++ b/scripts/plot/meshgrid.m
@@ -25,8 +25,8 @@
 ## and the columns of @var{yy} are copies of @var{y}.
 ## @end deftypefn
 ##
-## @seealso{sombrero, plot, semilogx, semilogy, loglog, polar, mesh, meshdom, contour,
-## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## @seealso{sombrero, plot, semilogx, semilogy, loglog, polar, mesh,
+## meshdom, contour, bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
--- a/scripts/plot/mplot.m
+++ b/scripts/plot/mplot.m
@@ -44,8 +44,8 @@
   global __multiplot_xi__;
   global __multiplot_yi__;
 
-  gset nologscale;
-  gset nopolar;
+  __gset__ nologscale;
+  __gset__ nopolar;
 
   __plt__ ("plot", varargin{:});
 
@@ -67,7 +67,7 @@
     xo = (__multiplot_xi__ - 1.0) * __multiplot_xsize__;
     yo = (__multiplot_yn__ - __multiplot_yi__) * __multiplot_ysize__;
 
-    eval (sprintf ("gset origin %g, %g", xo, yo));
+    eval (sprintf ("__gset__ origin %g, %g", xo, yo));
 
   endif
 
--- 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
 
-    gset multiplot;
+    __gset__ multiplot;
 
     xsize = 1.0 ./ xn;
     ysize = 1.0 ./ yn;
 
-    eval (sprintf ("gset size %g, %g", xsize, ysize));
+    eval (sprintf ("__gset__ size %g, %g", xsize, ysize));
 
     xo = 0.0;
     yo = (yn - 1.0)*ysize;
 
-    eval (sprintf ("gset origin %g, %g", xo, yo));
+    eval (sprintf ("__gset__ origin %g, %g", xo, yo));
 
     __multiplot_mode__ = 1;
     __multiplot_xsize__ = xsize;
--- a/scripts/plot/oneplot.m
+++ b/scripts/plot/oneplot.m
@@ -31,9 +31,9 @@
   global __multiplot_mode__ = 0;
 
   if (__multiplot_mode__)
-    gset nomultiplot;
-    gset size 1, 1;
-    gset origin 0, 0;
+    __gset__ nomultiplot;
+    __gset__ size 1, 1;
+    __gset__ origin 0, 0;
     __multiplot_mode__ = 0;
     gnuplot_command_replot = "rep";
   endif
--- a/scripts/plot/plot.m
+++ b/scripts/plot/plot.m
@@ -165,7 +165,7 @@
 ## @end deftypefn
 ##
 ## @seealso{semilogx, semilogy, loglog, polar, mesh, contour, __pltopt__
-## bar, stairs, errorbar, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, errorbar, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -175,8 +175,8 @@
   ## temporarily, probably inside an unwind_protect block, but there is
   ## no way to determine their current values.
 
-  gset nologscale;
-  gset nopolar;
+  __gset__ nologscale;
+  __gset__ nopolar;
 
   __plt__ ("plot", varargin{:});
 
--- a/scripts/plot/plot_border.m
+++ b/scripts/plot/plot_border.m
@@ -100,18 +100,18 @@
   endwhile
 
   if (none)
-    gset noborder;
+    __gset__ noborder;
   else
     if (all)
       border = 15;
     else
       border = south + west + north + east;
     endif
-    eval (sprintf ("gset border %d", border));
+    eval (sprintf ("__gset__ border %d", border));
   endif
 
   if (automatic_replot)
-    replot
+    replot ();
   endif
 
 endfunction
--- a/scripts/plot/polar.m
+++ b/scripts/plot/polar.m
@@ -26,7 +26,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, mesh, contour, bar,
-## stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## stairs, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -36,8 +36,8 @@
   ## temporarily, probably inside an unwind_protect block, but there is
   ## no way to determine their current values.
 
-  gset nologscale;
-  gset nopolar;
+  __gset__ nologscale;
+  __gset__ nopolar;
 
   if (nargin == 3)
     if (isstr (fmt))
new file mode 100644
--- /dev/null
+++ b/scripts/plot/replot.m
@@ -0,0 +1,37 @@
+## Copyright (C) 2005 John W. Eaton
+##
+## This file is part of Octave.
+##
+## Octave is free software; you can redistribute it and/or modify it
+## under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2, or (at your option)
+## any later version.
+##
+## Octave is distributed in the hope that it will be useful, but
+## WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+## General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with Octave; see the file COPYING.  If not, write to the Free
+## Software Foundation, 59 Temple Place - Suite 330, Boston, MA
+## 02111-1307, USA.
+
+## -*- texinfo -*-
+## @deftypefn {Function File} {} replot ()
+## Refressh the plot window.
+## @end deftypefn
+
+## Author: jwe
+
+function replot ()
+
+  if (nargin == 0)
+    ## No semicolon following the __greplot__ line unless you also fix
+    ## gplot.l to allow it.
+    __greplot__
+  else
+    usage ("replot ()");
+  endif
+
+endfunction
--- a/scripts/plot/semilogx.m
+++ b/scripts/plot/semilogx.m
@@ -25,7 +25,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogy, loglog, polar, mesh, contour, bar, stairs,
-## gplot, gsplot, replot, xlabel, ylabel, and title}
+## replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -35,9 +35,9 @@
   ## temporarily, probably inside an unwind_protect block, but there is
   ## no way to determine their current values.
 
-  gset logscale x;
-  gset nologscale y;
-  gset nopolar;
+  __gset__ logscale x;
+  __gset__ nologscale y;
+  __gset__ nopolar;
 
   __plt__ ("semilogx", varargin{:});
 
--- a/scripts/plot/semilogxerr.m
+++ b/scripts/plot/semilogxerr.m
@@ -36,7 +36,7 @@
 ## @end deftypefn
 ##
 ## @seealso{errorbar, loglogerr semilogyerr, polar, mesh, contour, __pltopt__, 
-## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Created: 20.2.2001
 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi>
@@ -48,9 +48,9 @@
     usage ("semilogxerr (...)");
   endif
 
-  gset logscale x;
-  gset nologscale y;
-  gset nopolar;
+  __gset__ logscale x;
+  __gset__ nologscale y;
+  __gset__ nopolar;
 
   __errcomm__ ("semilogxerr", varargin{:});
 
--- a/scripts/plot/semilogy.m
+++ b/scripts/plot/semilogy.m
@@ -25,7 +25,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, loglog, polar, mesh, contour, bar, stairs,
-## gplot, gsplot, replot, xlabel, ylabel, and title}
+## replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
@@ -35,9 +35,9 @@
   ## temporarily, probably inside an unwind_protect block, but there is
   ## no way to determine their current values.
 
-  gset nologscale x;
-  gset logscale y;
-  gset nopolar;
+  __gset__ nologscale x;
+  __gset__ logscale y;
+  __gset__ nopolar;
 
   __plt__ ("semilogy", varargin{:});
 
--- a/scripts/plot/semilogyerr.m
+++ b/scripts/plot/semilogyerr.m
@@ -36,7 +36,7 @@
 ## @end deftypefn
 ##
 ## @seealso{errorbar, loglogerr semilogxerr, polar, mesh, contour, __pltopt__, 
-## bar, stairs, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, stairs, replot, xlabel, ylabel, and title}
 
 ## Created: 20.2.2001
 ## Author: Teemu Ikonen <tpikonen@pcu.helsinki.fi>
@@ -48,9 +48,9 @@
     usage ("semilogyerr (...)");
   endif
 
-  gset nologscale x;
-  gset logscale y;
-  gset nopolar;
+  __gset__ nologscale x;
+  __gset__ logscale y;
+  __gset__ nopolar;
 
   __errcomm__ ("semilogyerr", varargin{:});
 
--- a/scripts/plot/shg.m
+++ b/scripts/plot/shg.m
@@ -21,12 +21,12 @@
 ## @deftypefn {Function File} {} shg
 ##
 ## Show the graph window.  Currently, this is the same as executing
-## replot without any arguments.
+## replot.
 ##
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## bar, stairs, gplot, gsplot, replot, xlabel, and ylabel}
+## bar, stairs, replot, xlabel, and ylabel}
 
 ## Author: jwe
 
@@ -36,6 +36,6 @@
     warning ("shg: ignoring extra arguments");
   endif
 
-  replot
+  replot ();
 
 endfunction
--- a/scripts/plot/stairs.m
+++ b/scripts/plot/stairs.m
@@ -44,7 +44,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## bar, gplot, gsplot, replot, xlabel, ylabel, and title}
+## bar, replot, xlabel, ylabel, and title}
 
 ## Author: jwe
 
--- a/scripts/plot/subplot.m
+++ b/scripts/plot/subplot.m
@@ -24,7 +24,7 @@
 ## given by index (there are @var{cols} by @var{rows} subwindows).
 ##
 ## The global variable @var{__multiplot_scale__} should be used when the
-## command @code{gset size xsize, ysize} has been used prior to calling
+## command @code{__gset__ size xsize, ysize} has been used prior to calling
 ## @code{subplot}.
 ##
 ## The value of @var{__multiplot_scale__} should be a vector with two
@@ -157,9 +157,9 @@
 
       gnuplot_command_replot = "cle;rep";
 
-      gset multiplot;
+      __gset__ multiplot;
 
-      eval (sprintf ("gset size %g, %g", __multiplot_xsize__,
+      eval (sprintf ("__gset__ size %g, %g", __multiplot_xsize__,
                      __multiplot_ysize__));
     endif
 
@@ -175,7 +175,7 @@
     xo = (xp - 1.0) * __multiplot_xsize__;
     yo = (rows - yp) * __multiplot_ysize__;
 
-    eval (sprintf ("gset origin %g, %g", xo, yo));
+    eval (sprintf ("__gset__ origin %g, %g", xo, yo));
 
   endif
 
--- 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 ("gset origin %g, %g", xo, yo));
+  eval (sprintf ("__gset__ origin %g, %g", xo, yo));
 
   clearplot;
 
--- a/scripts/plot/title.m
+++ b/scripts/plot/title.m
@@ -23,7 +23,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## bar, stairs, gplot, gsplot, replot, xlabel, and ylabel}
+## bar, stairs, replot, xlabel, and ylabel}
 
 ## Author: jwe
 
@@ -34,10 +34,10 @@
   endif
 
   if (isstr (text))
-    eval (sprintf ("gset title \"%s\"",
+    eval (sprintf ("__gset__ title \"%s\"",
 		   undo_string_escapes (undo_string_escapes (text))));
     if (automatic_replot)
-      replot
+      replot ();
     endif
   else
     error ("title: text must be a string");
--- a/scripts/plot/top_title.m
+++ b/scripts/plot/top_title.m
@@ -34,12 +34,12 @@
   endif
 
   if (isstr (text))
-    gset bottom_title;
-    gset title;
-    eval (sprintf ("gset top_title \"%s\"",
+    __gset__ bottom_title;
+    __gset__ title;
+    eval (sprintf ("__gset__ top_title \"%s\"",
 		   undo_string_escapes (undo_string_escapes (text))));
     if (automatic_replot)
-      replot
+      replot ();
     endif
   else
     error ("error: top_title: text must be a string");
--- a/scripts/plot/xlabel.m
+++ b/scripts/plot/xlabel.m
@@ -27,7 +27,7 @@
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
-## bar, stairs, gplot, gsplot, replot, ylabel, and title}
+## bar, stairs, replot, ylabel, and title}
 
 ## Author: jwe