changeset 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 bbb3fa6778f3
children f16aafdd99ca
files scripts/ChangeLog scripts/plot/gnuplot_drawnow.m
diffstat 2 files changed, 8 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-18  John W. Eaton  <jwe@octave.org>
+
+	* plot/gnuplot_drawnow.m (gnuplot_set_term):
+	Adjust nargin checks for new signature.
+
 2009-02-17  Ben Abbott  <bpabbott@mac.com>
 
 	* plot/contourc.m: Convert demo to test.
--- a/scripts/plot/gnuplot_drawnow.m
+++ b/scripts/plot/gnuplot_drawnow.m
@@ -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