diff scripts/plot/title.m @ 5152:b111ca4715c6

[project @ 2005-02-21 19:41:23 by jwe]
author jwe
date Mon, 21 Feb 2005 19:41:23 +0000
parents c08cb1098afc
children eecc24b92d97
line wrap: on
line diff
--- a/scripts/plot/title.m	Mon Feb 21 16:50:00 2005 +0000
+++ b/scripts/plot/title.m	Mon Feb 21 19:41:23 2005 +0000
@@ -19,8 +19,7 @@
 
 ## -*- texinfo -*-
 ## @deftypefn {Function File} {} title (@var{string})
-## Specify a title for a plot.  If you already have a plot displayed, use
-## the command @code{replot} to redisplay it with the new title.
+## Specify a title for a plot.
 ## @end deftypefn
 ##
 ## @seealso{plot, semilogx, semilogy, loglog, polar, mesh, contour,
@@ -37,6 +36,9 @@
   if (isstr (text))
     eval (sprintf ("gset title \"%s\"",
 		   undo_string_escapes (undo_string_escapes (text))));
+    if (automatic_replot)
+      replot
+    endif
   else
     error ("title: text must be a string");
   endif