Mercurial > hg > octave-lyh
diff scripts/plot/__plt2vv__.m @ 5115:57372235194b
[project @ 2005-01-24 18:38:45 by jwe]
author | jwe |
---|---|
date | Mon, 24 Jan 2005 18:38:45 +0000 |
parents | 17826ec287bc |
children | 4c8a2e4e0717 |
line wrap: on
line diff
--- a/scripts/plot/__plt2vv__.m +++ b/scripts/plot/__plt2vv__.m @@ -18,17 +18,15 @@ ## 02111-1307, USA. ## -*- texinfo -*- -## @deftypefn {Function File} {} __plt2vv__ (@var{x}, @var{y}, @var{fmt}) +## @deftypefn {Function File} {[data, fmtstr] =} __plt2vv__ (@var{x}, @var{y}, @var{fmt}) ## @end deftypefn ## Author: jwe -function __plt2vv__ (x, y, fmt) +function [data, fmtstr] = __plt2vv__ (x, y, fmt) - if (nargin < 2 || nargin > 3) - msg = sprintf ("__plt2vv__ (x, y)\n"); - msg = sprintf ("%s __plt2vv__ (x, y, fmt)", msg); - usage (msg); + if (nargin < 2 || nargin > 3 || nargout != 2) + usage ("[data, fmtstr] = __plt2vv__ (x, y, fmt)"); elseif (nargin == 2) fmt = ""; elseif (rows (fmt) > 1) @@ -56,8 +54,7 @@ error ("__plt2vv__: vector lengths must match"); endif - tmp = [x, y]; - cmd = sprintf ("gplot tmp %s", fmt); - eval (cmd); + data = [x, y]; + fmtstr = fmt; endfunction