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