Mercurial > hg > octave-lyh
changeset 10510:62ebba45054e
Respect the nextplot property value of 'new' for axes and 'replacechildren' for axes and figures.
author | Ben Abbott <bpabbott@mac.com> |
---|---|
date | Mon, 12 Apr 2010 18:03:25 -0400 |
parents | ddbd812d09aa |
children | 153e6226a669 |
files | scripts/ChangeLog scripts/plot/__plt_get_axis_arg__.m scripts/plot/newplot.m |
diffstat | 3 files changed, 13 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/scripts/ChangeLog +++ b/scripts/ChangeLog @@ -1,3 +1,9 @@ +2010-04-12 Ben Abbott <bpabbott@mac.com> + + * plot/__plt_get_axis_arg__.m, plot/newplot.m: Respect the nextplot + property value of 'new' for axes and 'replacechildren' for axes and + figures. + 2010-04-10 Ben Abbott <bpabbot@mac.com> * plot/__go_draw_figure__.m: Don't set background for non-visible axes.
--- a/scripts/plot/__plt_get_axis_arg__.m +++ b/scripts/plot/__plt_get_axis_arg__.m @@ -68,6 +68,10 @@ endif endif + if (ishandle (h) && strcmp (get (h, "nextplot"), "new")) + h = axes (); + endif + narg = length (varargin); endfunction
--- a/scripts/plot/newplot.m +++ b/scripts/plot/newplot.m @@ -36,6 +36,7 @@ case "new" case "add" case "replacechildren" + delete (get (cf, "children")) case "replace" otherwise error ("newplot: unrecognized nextplot property for current figure"); @@ -43,8 +44,10 @@ ca = gca (); anp = get (ca, "nextplot"); switch (anp) + case "new" case "add" case "replacechildren" + delete (get (ca, "children")) case "replace" __go_axes_init__ (ca, "replace"); __request_drawnow__ ();