Mercurial > hg > octave-lyh
diff scripts/plot/__plt2ss__.m @ 6264:cc2bee854d23
[project @ 2007-02-01 10:00:05 by jwe]
author | jwe |
---|---|
date | Thu, 01 Feb 2007 10:00:05 +0000 |
parents | 44c91c5dfe1d |
children | a5cd8b77e892 |
line wrap: on
line diff
--- a/scripts/plot/__plt2ss__.m +++ b/scripts/plot/__plt2ss__.m @@ -18,43 +18,41 @@ ## 02110-1301, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} __plt2ss__ (@var{h}, @var{x}, @var{y}, @var{fmt}, @var{key}) +## @deftypefn {Function File} {} __plt2ss__ (@var{h}, @var{x}, @var{y}, @var{options}) ## @end deftypefn ## Author: jwe -function __plt2ss__ (h, x, y, fmt, key) +function __plt2ss__ (h, x, y, options) - if (nargin < 3 || nargin > 5) + if (nargin < 3 || nargin > 4) print_usage (); endif - if (nargin < 4 || isempty (fmt)) - fmt = {""}; + if (nargin < 4 || isempty (options)) + options = __default_plot_options__ (); endif - if (nargin < 5 || isempty (key)) - key = {""}; - endif - - if (rows (fmt) > 1) - fmt = fmt(1); - endif - - if (rows (key) > 1) - key = key(1); + if (numel (options) > 1) + options = options(1); endif [x_nr, x_nc] = size (x); [y_nr, y_nc] = size (y); if (x_nr == 1 && x_nr == y_nr && x_nc == 1 && x_nc == y_nc) - key = key{1}; + key = options.key; if (! isempty (key)) set (h, "key", "on"); endif - ## FIXME -- need to handle labels and line format. - line (x, y, "keylabel", key); + color = options.color; + if (isempty (color)) + color = __next_line_color__ (); + endif + line (x, y, "keylabel", key, "color", color, + "linestyle", options.linestyle, + "marker", options.marker); +); else error ("__plt2ss__: arguments must be scalars"); endif