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 |
7016
|
7 ## the Free Software Foundation; either version 3 of the License, or (at |
|
8 ## your option) any later version. |
2313
|
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 |
7016
|
16 ## along with Octave; see the file COPYING. If not, see |
|
17 ## <http://www.gnu.org/licenses/>. |
245
|
18 |
6895
|
19 ## Undocumented internal function. |
3402
|
20 |
2314
|
21 ## Author: jwe |
|
22 |
6459
|
23 function retval = __plt2ss__ (h, x, y, options, properties) |
4
|
24 |
6459
|
25 if (nargin < 3 || nargin > 5) |
6046
|
26 print_usage (); |
6146
|
27 endif |
|
28 |
6264
|
29 if (nargin < 4 || isempty (options)) |
|
30 options = __default_plot_options__ (); |
6146
|
31 endif |
|
32 |
6459
|
33 if (nargin < 5) |
|
34 properties = {}; |
|
35 endif |
|
36 |
6264
|
37 if (numel (options) > 1) |
|
38 options = options(1); |
4
|
39 endif |
|
40 |
|
41 [x_nr, x_nc] = size (x); |
|
42 [y_nr, y_nc] = size (y); |
|
43 |
|
44 if (x_nr == 1 && x_nr == y_nr && x_nc == 1 && x_nc == y_nc) |
6264
|
45 key = options.key; |
6257
|
46 if (! isempty (key)) |
|
47 set (h, "key", "on"); |
|
48 endif |
6264
|
49 color = options.color; |
|
50 if (isempty (color)) |
|
51 color = __next_line_color__ (); |
|
52 endif |
6302
|
53 retval = line (x, y, "keylabel", key, "color", color, |
|
54 "linestyle", options.linestyle, |
6459
|
55 "marker", options.marker, properties{:}); |
4
|
56 else |
2315
|
57 error ("__plt2ss__: arguments must be scalars"); |
4
|
58 endif |
|
59 |
|
60 endfunction |