comparison scripts/plot/newplot.m @ 10770:84c35a483d1f

Support 'hold all' (Feature Request #30336)
author David Bateman <dbateman@free.fr>
date Wed, 07 Jul 2010 20:21:28 +0200
parents 95c3e38098bf
children fd0a3ac60b0e
comparison
equal deleted inserted replaced
10769:569823598028 10770:84c35a483d1f
24 ## @end deftypefn 24 ## @end deftypefn
25 25
26 function newplot () 26 function newplot ()
27 27
28 if (nargin == 0) 28 if (nargin == 0)
29 __next_line_color__ (true);
30 __next_line_style__ (true);
31 cf = gcf (); 29 cf = gcf ();
32 fnp = get (cf, "nextplot"); 30 fnp = get (cf, "nextplot");
33 switch (fnp) 31 switch (fnp)
34 ## FIXME -- probably we should do more than validate the nextplot 32 ## FIXME -- probably we should do more than validate the nextplot
35 ## property value... 33 ## property value...
41 otherwise 39 otherwise
42 error ("newplot: unrecognized nextplot property for current figure"); 40 error ("newplot: unrecognized nextplot property for current figure");
43 endswitch 41 endswitch
44 ca = gca (); 42 ca = gca ();
45 anp = get (ca, "nextplot"); 43 anp = get (ca, "nextplot");
44 if (strcmp (get (ca, "__hold_all__"), "off"))
45 __next_line_color__ (true);
46 __next_line_style__ (true);
47 else
48 __next_line_color__ (false);
49 __next_line_style__ (false);
50 endif
46 switch (anp) 51 switch (anp)
47 case "new" 52 case "new"
48 case "add" 53 case "add"
49 case "replacechildren" 54 case "replacechildren"
50 delete (get (ca, "children")) 55 delete (get (ca, "children"))