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