Mercurial > octave-nkf
annotate scripts/plot/__plt1__.m @ 8920:eb63fbe60fab
update copyright notices
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 07 Mar 2009 10:41:27 -0500 |
parents | 7d48766c21a5 |
children |
rev | line source |
---|---|
8920 | 1 ## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2005, 2006, 2007, 2009 |
7017 | 2 ## John W. Eaton |
2313 | 3 ## |
4 ## This file is part of Octave. | |
5 ## | |
6 ## Octave is free software; you can redistribute it and/or modify it | |
7 ## under the terms of the GNU General Public License as published by | |
7016 | 8 ## the Free Software Foundation; either version 3 of the License, or (at |
9 ## your option) any later version. | |
2313 | 10 ## |
11 ## Octave is distributed in the hope that it will be useful, but | |
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of | |
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
14 ## General Public License for more details. | |
15 ## | |
16 ## You should have received a copy of the GNU General Public License | |
7016 | 17 ## along with Octave; see the file COPYING. If not, see |
18 ## <http://www.gnu.org/licenses/>. | |
933 | 19 |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
20 ## -*- texinfo -*- |
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
21 ## @deftypefn {Function File} {} __plt1__ (@var{h}, @var{x1}, @var{options}, @var{properties}) |
6895 | 22 ## Undocumented internal function. |
8812
7d48766c21a5
use consistent format for doc strings of internal functions
John W. Eaton <jwe@octave.org>
parents:
7017
diff
changeset
|
23 ## @end deftypefn |
3402 | 24 |
2314 | 25 ## Author: jwe |
26 | |
6459 | 27 function retval = __plt1__ (h, x1, options, properties) |
933 | 28 |
6459 | 29 if (nargin < 2 || nargin > 4) |
6046 | 30 print_usage (); |
933 | 31 endif |
32 | |
6264 | 33 if (nargin < 3 || isempty (options)) |
34 options = __default_plot_options__ (); | |
933 | 35 endif |
36 | |
6459 | 37 if (nargin < 4) |
38 properties = {}; | |
39 endif | |
40 | |
6264 | 41 if (! isstruct (options)) |
42 error ("__plt1__: options must be a struct array"); | |
933 | 43 endif |
44 | |
45 [nr, nc] = size (x1); | |
46 if (nr == 1) | |
1169 | 47 x1 = x1.'; |
933 | 48 tmp = nr; |
49 nr = nc; | |
50 nc = tmp; | |
51 endif | |
52 x1_i = imag (x1); | |
53 if (any (any (x1_i))) | |
54 x2 = x1_i; | |
55 x1 = real (x1); | |
56 else | |
57 x2 = x1; | |
58 x1 = (1:nr)'; | |
59 endif | |
60 | |
6459 | 61 retval = __plt2__ (h, x1, x2, options, properties); |
933 | 62 |
63 endfunction |