diff scripts/plot/polar.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 95c3e38098bf
children fd0a3ac60b0e
line wrap: on
line diff
--- a/scripts/plot/polar.m
+++ b/scripts/plot/polar.m
@@ -18,7 +18,10 @@
 ## <http://www.gnu.org/licenses/>.
 
 ## -*- texinfo -*-
-## @deftypefn {Function File} {} polar (@var{theta}, @var{rho}, @var{fmt})
+## @deftypefn  {Function File} {} polar (@var{theta}, @var{rho})
+## @deftypefnx {Function File} {} polar (@var{theta}, @var{rho}, @var{fmt})
+## @deftypefnx {Function File} {} polar (@var{h}, @dots{})
+## @deftypefnx {Function File} {@var{h} =} polar (@dots{})
 ## Make a two-dimensional plot given the polar coordinates @var{theta} and
 ## @var{rho}.
 ##
@@ -32,6 +35,10 @@
 
   [h, varargin, nargs] = __plt_get_axis_arg__ ("polar", varargin{:});
 
+  if (nargs < 1)
+    print_usage(); 
+  endif
+
   oldh = gca ();
   unwind_protect
     axes (h);