7017
|
1 ## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2005, 2006, 2007 |
|
2 ## 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/>. |
933
|
19 |
6895
|
20 ## Undocumented internal function. |
3402
|
21 |
2314
|
22 ## Author: jwe |
|
23 |
6459
|
24 function retval = __plt1__ (h, x1, options, properties) |
933
|
25 |
6459
|
26 if (nargin < 2 || nargin > 4) |
6046
|
27 print_usage (); |
933
|
28 endif |
|
29 |
6264
|
30 if (nargin < 3 || isempty (options)) |
|
31 options = __default_plot_options__ (); |
933
|
32 endif |
|
33 |
6459
|
34 if (nargin < 4) |
|
35 properties = {}; |
|
36 endif |
|
37 |
6264
|
38 if (! isstruct (options)) |
|
39 error ("__plt1__: options must be a struct array"); |
933
|
40 endif |
|
41 |
|
42 [nr, nc] = size (x1); |
|
43 if (nr == 1) |
1169
|
44 x1 = x1.'; |
933
|
45 tmp = nr; |
|
46 nr = nc; |
|
47 nc = tmp; |
|
48 endif |
|
49 x1_i = imag (x1); |
|
50 if (any (any (x1_i))) |
|
51 x2 = x1_i; |
|
52 x1 = real (x1); |
|
53 else |
|
54 x2 = x1; |
|
55 x1 = (1:nr)'; |
|
56 endif |
|
57 |
6459
|
58 retval = __plt2__ (h, x1, x2, options, properties); |
933
|
59 |
|
60 endfunction |