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. |
245
|
19 |
6895
|
20 ## Undocumented internal function. |
3402
|
21 |
2314
|
22 ## Author: jwe |
|
23 |
6459
|
24 function retval = __plt2ss__ (h, x, y, options, properties) |
4
|
25 |
6459
|
26 if (nargin < 3 || nargin > 5) |
6046
|
27 print_usage (); |
6146
|
28 endif |
|
29 |
6264
|
30 if (nargin < 4 || isempty (options)) |
|
31 options = __default_plot_options__ (); |
6146
|
32 endif |
|
33 |
6459
|
34 if (nargin < 5) |
|
35 properties = {}; |
|
36 endif |
|
37 |
6264
|
38 if (numel (options) > 1) |
|
39 options = options(1); |
4
|
40 endif |
|
41 |
|
42 [x_nr, x_nc] = size (x); |
|
43 [y_nr, y_nc] = size (y); |
|
44 |
|
45 if (x_nr == 1 && x_nr == y_nr && x_nc == 1 && x_nc == y_nc) |
6264
|
46 key = options.key; |
6257
|
47 if (! isempty (key)) |
|
48 set (h, "key", "on"); |
|
49 endif |
6264
|
50 color = options.color; |
|
51 if (isempty (color)) |
|
52 color = __next_line_color__ (); |
|
53 endif |
6302
|
54 retval = line (x, y, "keylabel", key, "color", color, |
|
55 "linestyle", options.linestyle, |
6459
|
56 "marker", options.marker, properties{:}); |
4
|
57 else |
2315
|
58 error ("__plt2ss__: arguments must be scalars"); |
4
|
59 endif |
|
60 |
|
61 endfunction |