comparison scripts/plot/__plt1__.m @ 6257:44c91c5dfe1d

[project @ 2007-01-30 19:16:52 by jwe]
author jwe
date Tue, 30 Jan 2007 19:16:55 +0000
parents 1a6d826e92b5
children cc2bee854d23
comparison
equal deleted inserted replaced
6256:83949ae13b2c 6257:44c91c5dfe1d
16 ## along with Octave; see the file COPYING. If not, write to the Free 16 ## along with Octave; see the file COPYING. If not, write to the Free
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
18 ## 02110-1301, USA. 18 ## 02110-1301, USA.
19 19
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {[data, fmtstr] =} __plt1__ (@var{x1}, @var{fmt}) 21 ## @deftypefn {Function File} {} __plt1__ (@var{h}, @var{x1}, @var{fmt}, @var{key})
22 ## @end deftypefn 22 ## @end deftypefn
23 23
24 ## Author: jwe 24 ## Author: jwe
25 25
26 function [data, fmtstr, key] = __plt1__ (x1, fmt, keystr) 26 function __plt1__ (h, x1, fmt, key)
27 27
28 if (nargin < 1 || nargin > 3 || nargout < 2 || nargout > 3) 28 if (nargin < 2 || nargin > 4)
29 print_usage (); 29 print_usage ();
30 endif 30 endif
31 31
32 if (nargin < 2) 32 if (nargin < 3 || isempty (fmt))
33 fmt = {""}; 33 fmt = {""};
34 endif 34 endif
35 35
36 if (nargin < 3) 36 if (nargin < 4 || isempty (key))
37 keystr = {""}; 37 key = {""};
38 endif 38 endif
39 39
40 if (! iscellstr (fmt)) 40 if (! iscellstr (fmt))
41 error ("__plt1__: fmt must be a cell array of character strings"); 41 error ("__plt1__: fmt must be a cell array of character strings");
42 endif 42 endif
43 43
44 if (! iscell (keystr)) 44 if (! iscell (key))
45 error ("__plt1__: fmt must be a cell array"); 45 error ("__plt1__: fmt must be a cell array");
46 endif 46 endif
47 47
48 [nr, nc] = size (x1); 48 [nr, nc] = size (x1);
49 if (nr == 1) 49 if (nr == 1)
59 else 59 else
60 x2 = x1; 60 x2 = x1;
61 x1 = (1:nr)'; 61 x1 = (1:nr)';
62 endif 62 endif
63 63
64 [data, fmtstr, key] = __plt2__ (x1, x2, fmt, keystr); 64 __plt2__ (h, x1, x2, fmt, key);
65 65
66 endfunction 66 endfunction