Mercurial > hg > octave-lyh
comparison 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 |
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} {} polar (@var{theta}, @var{rho}, @var{fmt}) | 21 ## @deftypefn {Function File} {} polar (@var{theta}, @var{rho}) |
22 ## @deftypefnx {Function File} {} polar (@var{theta}, @var{rho}, @var{fmt}) | |
23 ## @deftypefnx {Function File} {} polar (@var{h}, @dots{}) | |
24 ## @deftypefnx {Function File} {@var{h} =} polar (@dots{}) | |
22 ## Make a two-dimensional plot given the polar coordinates @var{theta} and | 25 ## Make a two-dimensional plot given the polar coordinates @var{theta} and |
23 ## @var{rho}. | 26 ## @var{rho}. |
24 ## | 27 ## |
25 ## The optional third argument specifies the line type. | 28 ## The optional third argument specifies the line type. |
26 ## @seealso{plot} | 29 ## @seealso{plot} |
29 ## Author: jwe | 32 ## Author: jwe |
30 | 33 |
31 function retval = polar (varargin) | 34 function retval = polar (varargin) |
32 | 35 |
33 [h, varargin, nargs] = __plt_get_axis_arg__ ("polar", varargin{:}); | 36 [h, varargin, nargs] = __plt_get_axis_arg__ ("polar", varargin{:}); |
37 | |
38 if (nargs < 1) | |
39 print_usage(); | |
40 endif | |
34 | 41 |
35 oldh = gca (); | 42 oldh = gca (); |
36 unwind_protect | 43 unwind_protect |
37 axes (h); | 44 axes (h); |
38 newplot (); | 45 newplot (); |