comparison 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
comparison
equal deleted inserted replaced
10729:172253d75d94 10730:390d93e20531
16 ## You should have received a copy of the GNU General Public License 16 ## You should have received a copy of the GNU General Public License
17 ## along with Octave; see the file COPYING. If not, see 17 ## along with Octave; see the file COPYING. If not, see
18 ## <http://www.gnu.org/licenses/>. 18 ## <http://www.gnu.org/licenses/>.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {} semilogy (@var{args}) 21 ## @deftypefn {Function File} {} semilogy (@var{y})
22 ## @deftypefnx {Function File} {} semilogy (@var{x}, @var{y})
23 ## @deftypefnx {Function File} {} semilogy (@var{x}, @var{y}, @var{property}, @var{value}, @dots{})
24 ## @deftypefnx {Function File} {} semilogy (@var{x}, @var{y}, @var{fmt})
25 ## @deftypefnx {Function File} {} semilogy (@var{h}, @dots{})
26 ## @deftypefnx {Function File} {@var{h} =} semilogy (@dots{})
22 ## Produce a two-dimensional plot using a logarithmic scale for the @var{y} 27 ## Produce a two-dimensional plot using a logarithmic scale for the @var{y}
23 ## axis. See the description of @code{plot} for a description of the 28 ## axis. See the documentation of @code{plot} for a description of the
24 ## arguments that @code{semilogy} will accept. 29 ## arguments that @code{semilogy} will accept.
25 ## @seealso{plot, semilogx, loglog} 30 ## @seealso{plot, semilogx, loglog}
26 ## @end deftypefn 31 ## @end deftypefn
27 32
28 ## Author: jwe 33 ## Author: jwe
29 34
30 function retval = semilogy (varargin) 35 function retval = semilogy (varargin)
31 36
32 [h, varargin] = __plt_get_axis_arg__ ("semilogy", varargin{:}); 37 [h, varargin, nargs] = __plt_get_axis_arg__ ("semilogy", varargin{:});
38
39 if (nargs < 1)
40 print_usage();
41 endif
33 42
34 oldh = gca (); 43 oldh = gca ();
35 unwind_protect 44 unwind_protect
36 axes (h); 45 axes (h);
37 newplot (); 46 newplot ();