2847
|
1 ## Copyright (C) 1996, 1997 John W. Eaton |
2313
|
2 ## |
|
3 ## This file is part of Octave. |
|
4 ## |
|
5 ## Octave is free software; you can redistribute it and/or modify it |
|
6 ## under the terms of the GNU General Public License as published by |
|
7 ## the Free Software Foundation; either version 2, or (at your option) |
|
8 ## any later version. |
|
9 ## |
|
10 ## Octave is distributed in the hope that it will be useful, but |
|
11 ## WITHOUT ANY WARRANTY; without even the implied warranty of |
|
12 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|
13 ## General Public License for more details. |
|
14 ## |
|
15 ## You should have received a copy of the GNU General Public License |
|
16 ## along with Octave; see the file COPYING. If not, write to the Free |
5307
|
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
18 ## 02110-1301, USA. |
933
|
19 |
3449
|
20 ## -*- texinfo -*- |
6257
|
21 ## @deftypefn {Function File} {} __plt1__ (@var{h}, @var{x1}, @var{fmt}, @var{key}) |
3449
|
22 ## @end deftypefn |
3402
|
23 |
2314
|
24 ## Author: jwe |
|
25 |
6302
|
26 function retval = __plt1__ (h, x1, options) |
933
|
27 |
6264
|
28 if (nargin < 2 || nargin > 3) |
6046
|
29 print_usage (); |
933
|
30 endif |
|
31 |
6264
|
32 if (nargin < 3 || isempty (options)) |
|
33 options = __default_plot_options__ (); |
933
|
34 endif |
|
35 |
6264
|
36 if (! isstruct (options)) |
|
37 error ("__plt1__: options must be a struct array"); |
933
|
38 endif |
|
39 |
|
40 [nr, nc] = size (x1); |
|
41 if (nr == 1) |
1169
|
42 x1 = x1.'; |
933
|
43 tmp = nr; |
|
44 nr = nc; |
|
45 nc = tmp; |
|
46 endif |
|
47 x1_i = imag (x1); |
|
48 if (any (any (x1_i))) |
|
49 x2 = x1_i; |
|
50 x1 = real (x1); |
|
51 else |
|
52 x2 = x1; |
|
53 x1 = (1:nr)'; |
|
54 endif |
|
55 |
6302
|
56 retval = __plt2__ (h, x1, x2, options); |
933
|
57 |
|
58 endfunction |