diff scripts/plot/gnuplot_drawnow.m @ 8793:4c989d52f35c

gnuplot_drawnow.m (gnuplot_set_term): adjust nargin checks for new signature
author John W. Eaton <jwe@octave.org>
date Wed, 18 Feb 2009 01:06:46 -0500
parents d9bff42fec43
children 70d06ed27c08
line wrap: on
line diff
--- a/scripts/plot/gnuplot_drawnow.m	Wed Feb 18 00:55:32 2009 -0500
+++ b/scripts/plot/gnuplot_drawnow.m	Wed Feb 18 01:06:46 2009 -0500
@@ -120,7 +120,7 @@
   ## the subset of properties "position", "units", "paperposition",
   ## "paperunits", "name", and "numbertitle".  When "term" originates
   ## from print.m, it may include gnuplot terminal options.
-  if (nargin == 3)
+  if (nargin < 4)
     ## This supports the gnuplot backend.
     term = gnuplot_term ();
     opts_str = "";
@@ -248,7 +248,7 @@
         ## for terminals cdr/corel.
         term_str = sprintf ("%s %s", term_str, size_str);
       endif
-      if (nargin > 2 && ischar (opts_str))
+      if (nargin > 3 && ischar (opts_str))
         ## Options must go last.
         term_str = sprintf ("%s %s", term_str, opts_str);
       endif
@@ -260,7 +260,7 @@
     endif
   endif
 
-  if (nargin == 4)
+  if (nargin == 5)
     if (! isempty (file))
       fprintf (plot_stream, "set output \"%s\";\n", file);
     endif