diff scripts/plot/plot.m @ 10730:390d93e20531

Plot commands now print usage information without errors when called with no arguments (bug #29986).
author Rik <octave@nomad.inbox5.com>
date Thu, 24 Jun 2010 12:22:27 -0700
parents a8ce6bdecce5
children 3140cb7a05a1
line wrap: on
line diff
--- a/scripts/plot/plot.m
+++ b/scripts/plot/plot.m
@@ -179,7 +179,11 @@
 
 function retval = plot (varargin)
 
-  [h, varargin] = __plt_get_axis_arg__ ("plot", varargin{:});
+  [h, varargin, nargs] = __plt_get_axis_arg__ ("plot", varargin{:});
+
+  if (nargs < 1)
+    print_usage(); 
+  endif
 
   oldh = gca ();
   unwind_protect