Mercurial > hg > octave-lyh
comparison scripts/plot/newplot.m @ 8228:53dbbd331498
Preserve font and position properties when axes are replace in the handle code
author | David Bateman <dbateman@free.fr> |
---|---|
date | Thu, 16 Oct 2008 14:49:08 +0100 |
parents | 4e05ba66ead2 |
children | b12a2975bf7e |
comparison
equal
deleted
inserted
replaced
8227:586b02ac671e | 8228:53dbbd331498 |
---|---|
42 anp = get (ca, "nextplot"); | 42 anp = get (ca, "nextplot"); |
43 switch (anp) | 43 switch (anp) |
44 case "add" | 44 case "add" |
45 case "replacechildren" | 45 case "replacechildren" |
46 case "replace" | 46 case "replace" |
47 ## Preserve certain axes properties | |
48 fontprops = {"fontangle", get(ca, "fontangle"), ... | |
49 "fontname", get(ca, "fontname"), ... | |
50 "fontsize", get(ca, "fontsize"), ... | |
51 "fontunits", get(ca, "fontunits"), ... | |
52 "fontweight", get(ca, "fontweight"), ... | |
53 "position", get(ca, "position"), ... | |
54 "outerposition", get(ca, "outerposition"), ... | |
55 "activepositionproperty", get(ca, "activepositionproperty")}; | |
56 __go_axes_init__ (ca, "replace"); | 47 __go_axes_init__ (ca, "replace"); |
57 set (ca, fontprops{:}); | |
58 __request_drawnow__ (); | 48 __request_drawnow__ (); |
59 otherwise | 49 otherwise |
60 error ("newplot: unrecognized nextplot property for current axes"); | 50 error ("newplot: unrecognized nextplot property for current axes"); |
61 endswitch | 51 endswitch |
62 | 52 |