Mercurial > hg > octave-nkf
diff scripts/plot/figure.m @ 6405:b298a4c12fc3
[project @ 2007-03-14 16:51:28 by jwe]
author | jwe |
---|---|
date | Wed, 14 Mar 2007 16:51:30 +0000 |
parents | 22e2c78e406e |
children | 38bc358b6c9a |
line wrap: on
line diff
--- a/scripts/plot/figure.m +++ b/scripts/plot/figure.m @@ -30,7 +30,7 @@ nargs = nargin; - f = []; + f = NaN; init_new_figure = false; if (mod (nargs, 2) == 1) @@ -54,19 +54,18 @@ ## or switching to. cf = get (0, "currentfigure"); if (! isempty (cf) && cf != 0) - if (isempty (f) || cf != f) + if (isnan (f) || cf != f) drawnow (); endif endif if (rem (nargs, 2) == 0) - if (isempty (f) || init_new_figure) - f = __uiobject_init_figure__ (f); + if (isnan (f) || init_new_figure) + f = __go_figure__ (f); endif if (nargs > 0) set (f, varargin{:}); endif - __uiobject_adopt__ (0, f); set (0, "currentfigure", f); else print_usage ();