Mercurial > hg > octave-nkf
annotate scripts/plot/polar.m @ 10549:95c3e38098bf
Untabify .m scripts
author | Rik <code@nomad.inbox5.com> |
---|---|
date | Fri, 23 Apr 2010 11:28:50 -0700 |
parents | 2884758e265b |
children | 390d93e20531 |
rev | line source |
---|---|
7017 | 1 ## Copyright (C) 1993, 1994, 1995, 1996, 1997, 1999, 2000, 2004, 2005, |
2 ## 2006, 2007 John W. Eaton | |
2313 | 3 ## |
4 ## This file is part of Octave. | |
5 ## | |
6 ## Octave is free software; you can redistribute it and/or modify it | |
7 ## under the terms of the GNU General Public License as published by | |
7016 | 8 ## the Free Software Foundation; either version 3 of the License, or (at |
9 ## your option) any later version. | |
2313 | 10 ## |
11 ## Octave is distributed in the hope that it will be useful, but | |
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 ## General Public License for more details. | |
15 ## | |
16 ## You should have received a copy of the GNU General Public License | |
7016 | 17 ## along with Octave; see the file COPYING. If not, see |
18 ## <http://www.gnu.org/licenses/>. | |
245 | 19 |
3368 | 20 ## -*- texinfo -*- |
21 ## @deftypefn {Function File} {} polar (@var{theta}, @var{rho}, @var{fmt}) | |
7180 | 22 ## Make a two-dimensional plot given the polar coordinates @var{theta} and |
3368 | 23 ## @var{rho}. |
2311 | 24 ## |
25 ## The optional third argument specifies the line type. | |
6895 | 26 ## @seealso{plot} |
3368 | 27 ## @end deftypefn |
4 | 28 |
2314 | 29 ## Author: jwe |
30 | |
6302 | 31 function retval = polar (varargin) |
4 | 32 |
7321 | 33 [h, varargin, nargs] = __plt_get_axis_arg__ ("polar", varargin{:}); |
7216 | 34 |
7207 | 35 oldh = gca (); |
36 unwind_protect | |
37 axes (h); | |
38 newplot (); | |
3063 | 39 |
7207 | 40 if (nargs == 3) |
41 if (! ischar (varargin{3})) | |
10549 | 42 error ("polar: third argument must be a string"); |
7207 | 43 endif |
44 tmp = __plr2__ (h, varargin{:}); | |
7321 | 45 maxr = max (varargin {2} (:)); |
46 elseif (nargs == 2) | |
7207 | 47 if (ischar (varargin{2})) |
10549 | 48 tmp = __plr1__ (h, varargin{:}); |
49 if (iscomplex(varargin{1})) | |
50 maxr = max (imag(varargin{1})(:)); | |
51 else | |
52 maxr = max (varargin{1}(:)); | |
53 endif | |
7207 | 54 else |
10549 | 55 fmt = ""; |
56 tmp = __plr2__ (h, varargin{:}, fmt); | |
57 maxr = max (varargin {2} (:)); | |
7207 | 58 endif |
7321 | 59 elseif (nargs == 1) |
7207 | 60 fmt = ""; |
61 tmp = __plr1__ (h, varargin{:}, fmt); | |
7321 | 62 if (iscomplex(varargin{1})) |
10549 | 63 maxr = max (imag(varargin{1})(:)); |
7321 | 64 else |
10549 | 65 maxr = max (varargin{1}(:)); |
7321 | 66 endif |
7207 | 67 else |
68 print_usage (); | |
934 | 69 endif |
7207 | 70 |
7321 | 71 set (h, "xlim", [-maxr, maxr], "ylim", [-maxr, maxr], |
10549 | 72 "xaxislocation", "zero", "yaxislocation", "zero", |
73 "plotboxaspectratio", [1, 1, 1]); | |
7321 | 74 |
7207 | 75 if (nargout > 0) |
76 retval = tmp; | |
934 | 77 endif |
7207 | 78 unwind_protect_cleanup |
79 axes (oldh); | |
80 end_unwind_protect | |
6302 | 81 |
4 | 82 endfunction |
9896
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
83 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
84 function retval = __plr1__ (h, theta, fmt) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
85 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
86 if (nargin != 3) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
87 print_usage (); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
88 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
89 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
90 [nr, nc] = size (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
91 if (nr == 1) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
92 theta = theta'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
93 tmp = nr; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
94 nr = nc; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
95 nc = tmp; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
96 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
97 theta_i = imag (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
98 if (any (theta_i)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
99 rho = theta_i; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
100 theta = real (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
101 else |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
102 rho = theta; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
103 theta = (1:nr)'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
104 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
105 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
106 retval = __plr2__ (h, theta, rho, fmt); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
107 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
108 endfunction |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
109 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
110 function retval = __plr2__ (h, theta, rho, fmt) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
111 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
112 if (nargin != 4) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
113 print_usage (); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
114 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
115 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
116 if (any (imag (theta))) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
117 theta = real (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
118 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
119 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
120 if (any (imag (rho))) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
121 rho = real (rho); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
122 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
123 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
124 if (isscalar (theta)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
125 if (isscalar (rho)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
126 x = rho * cos (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
127 y = rho * sin (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
128 retval = __plt__ ("polar", h, x, y, fmt); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
129 else |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
130 error ("__plr2__: invalid data for plotting"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
131 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
132 elseif (isvector (theta)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
133 if (isvector (rho)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
134 if (length (theta) != length (rho)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
135 error ("__plr2__: vector lengths must match"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
136 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
137 if (rows (rho) == 1) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
138 rho = rho'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
139 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
140 if (rows (theta) == 1) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
141 theta = theta'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
142 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
143 x = rho .* cos (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
144 y = rho .* sin (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
145 retval = __plt__ ("polar", h, x, y, fmt); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
146 elseif (ismatrix (rho)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
147 [t_nr, t_nc] = size (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
148 if (t_nr == 1) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
149 theta = theta'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
150 tmp = t_nr; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
151 t_nr = t_nc; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
152 t_nc = tmp; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
153 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
154 [r_nr, r_nc] = size (rho); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
155 if (t_nr != r_nr) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
156 rho = rho'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
157 tmp = r_nr; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
158 r_nr = r_nc; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
159 r_nc = tmp; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
160 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
161 if (t_nr != r_nr) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
162 error ("__plr2__: vector and matrix sizes must match"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
163 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
164 x = diag (cos (theta)) * rho; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
165 y = diag (sin (theta)) * rho; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
166 retval = __plt__ ("polar", h, x, y, fmt); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
167 else |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
168 error ("__plr2__: invalid data for plotting"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
169 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
170 elseif (ismatrix (theta)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
171 if (isvector (rho)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
172 [r_nr, r_nc] = size (rho); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
173 if (r_nr == 1) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
174 rho = rho'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
175 tmp = r_nr; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
176 r_nr = r_nc; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
177 r_nc = tmp; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
178 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
179 [t_nr, t_nc] = size (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
180 if (r_nr != t_nr) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
181 theta = theta'; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
182 tmp = t_nr; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
183 t_nr = t_nc; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
184 t_nc = tmp; |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
185 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
186 if (r_nr != t_nr) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
187 error ("__plr2__: vector and matrix sizes must match"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
188 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
189 diag_r = diag (rho); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
190 x = diag_r * cos (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
191 y = diag_r * sin (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
192 retval = __plt__ ("polar", h, x, y, fmt); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
193 elseif (ismatrix (rho)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
194 if (! size_equal (rho, theta)) |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
195 error ("__plr2__: matrix dimensions must match"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
196 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
197 x = rho .* cos (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
198 y = rho .* sin (theta); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
199 retval = __plt__ ("polar", h, x, y, fmt); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
200 else |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
201 error ("__plr2__: invalid data for plotting"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
202 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
203 else |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
204 error ("__plr2__: invalid data for plotting"); |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
205 endif |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
206 |
1aeb39118764
convert some plot functions to subfunctions or make some them private
John W. Eaton <jwe@octave.org>
parents:
7321
diff
changeset
|
207 endfunction |