Mercurial > hg > octave-lyh
comparison 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 |
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} {} loglog (@var{args}) | 21 ## @deftypefn {Function File} {} loglog (@var{y}) |
22 ## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}) | |
23 ## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{property}, @var{value}, @dots{}) | |
24 ## @deftypefnx {Function File} {} loglog (@var{x}, @var{y}, @var{fmt}) | |
25 ## @deftypefnx {Function File} {} loglog (@var{h}, @dots{}) | |
26 ## @deftypefnx {Function File} {@var{h} =} loglog (@dots{}) | |
22 ## Produce a two-dimensional plot using log scales for both axes. See | 27 ## Produce a two-dimensional plot using log scales for both axes. See |
23 ## the description of @code{plot} for a description of the arguments | 28 ## the documentation of @code{plot} for a description of the arguments |
24 ## that @code{loglog} will accept. | 29 ## that @code{loglog} will accept. |
25 ## @seealso{plot, semilogx, semilogy} | 30 ## @seealso{plot, semilogx, semilogy} |
26 ## @end deftypefn | 31 ## @end deftypefn |
27 | 32 |
28 ## Author: jwe | 33 ## Author: jwe |
29 | 34 |
30 function retval = loglog (varargin) | 35 function retval = loglog (varargin) |
31 | 36 |
32 [h, varargin] = __plt_get_axis_arg__ ("loglog", varargin{:}); | 37 [h, varargin, nargs] = __plt_get_axis_arg__ ("loglog", 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 (); |