Mercurial > hg > octave-lyh
diff scripts/plot/loglog.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 | 153e6226a669 |
children | fd0a3ac60b0e |
line wrap: on
line diff
--- a/scripts/plot/loglog.m +++ b/scripts/plot/loglog.m @@ -18,9 +18,14 @@ ## <http://www.gnu.org/licenses/>. ## -*- texinfo -*- -## @deftypefn {Function File} {} loglog (@var{args}) +## @deftypefn {Function File} {} loglog (@var{y}) +## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}) +## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{property}, @var{value}, @dots{}) +## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{fmt}) +## @deftypefnx {Function File} {} loglog (@var{h}, @dots{}) +## @deftypefnx {Function File} {@var{h} =} loglog (@dots{}) ## Produce a two-dimensional plot using log scales for both axes. See -## the description of @code{plot} for a description of the arguments +## the documentation of @code{plot} for a description of the arguments ## that @code{loglog} will accept. ## @seealso{plot, semilogx, semilogy} ## @end deftypefn @@ -29,7 +34,11 @@ function retval = loglog (varargin) - [h, varargin] = __plt_get_axis_arg__ ("loglog", varargin{:}); + [h, varargin, nargs] = __plt_get_axis_arg__ ("loglog", varargin{:}); + + if (nargs < 1) + print_usage(); + endif oldh = gca (); unwind_protect