6257
|
1 ## Copyright (C) 2005 John W. Eaton |
|
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 |
|
17 ## Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA |
|
18 ## 02110-1301, USA. |
|
19 |
|
20 ## -*- texinfo -*- |
|
21 ## @deftypefn {Function File} {} newplot () |
|
22 ## @end deftypefn |
|
23 |
|
24 function newplot () |
|
25 |
|
26 if (nargin == 0) |
|
27 cf = gcf (); |
|
28 fnp = get (cf, "nextplot"); |
|
29 switch (fnp) |
6314
|
30 ## FIXME -- probably we should do more than validate the nextplot |
|
31 ## property value... |
6257
|
32 case "new" |
|
33 case "add" |
|
34 case "replacechildren" |
|
35 case "replace" |
|
36 otherwise |
|
37 error ("newplot: unrecognized nextplot property for current figure"); |
|
38 endswitch |
|
39 ca = gca (); |
|
40 anp = get (ca, "nextplot"); |
|
41 switch (anp) |
|
42 case "add" |
|
43 case "replacechildren" |
|
44 case "replace" |
6264
|
45 __next_line_color__ (true); |
6314
|
46 __uiobject_axes_init__ (ca, "replace"); |
6257
|
47 otherwise |
|
48 error ("newplot: unrecognized nextplot property for current axes"); |
|
49 endswitch |
|
50 else |
|
51 print_usage (); |
|
52 endif |
|
53 |
|
54 endfunction |