# HG changeset patch # User jwe # Date 1184781896 0 # Node ID 38bc358b6c9ab60301b9b7d179d1c5c1809bcbe2 # Parent 301ca8b69d03425fc416fe23080e0b446a58cf64 [project @ 2007-07-18 18:02:56 by jwe] diff -r 301ca8b69d03 -r 38bc358b6c9a scripts/ChangeLog --- a/scripts/ChangeLog Wed Jul 18 17:45:56 2007 +0000 +++ b/scripts/ChangeLog Wed Jul 18 18:04:56 2007 +0000 @@ -1,3 +1,10 @@ +2007-07-18 Michael Goffioul + + * plot/clf.m: Check for valid handle before deleting. + + * plot/figure.m: Pass "figure" property/value pairs directly to + __go_figure__ instead of using regular "set" call. + 2007-07-18 Paul Kienzle * plot/drawnow.m: Prefer GNUTERM to DISPLAY when choosing terminal diff -r 301ca8b69d03 -r 38bc358b6c9a scripts/plot/clf.m --- a/scripts/plot/clf.m Wed Jul 18 17:45:56 2007 +0000 +++ b/scripts/plot/clf.m Wed Jul 18 18:04:56 2007 +0000 @@ -30,7 +30,9 @@ cf = gcf (); set (cf, "currentaxes", []); for k = get (cf, "children") - delete (k); + if (ishandle (k)) + delete (k); + endif endfor else print_usage (); diff -r 301ca8b69d03 -r 38bc358b6c9a scripts/plot/figure.m --- a/scripts/plot/figure.m Wed Jul 18 17:45:56 2007 +0000 +++ b/scripts/plot/figure.m Wed Jul 18 18:04:56 2007 +0000 @@ -61,9 +61,8 @@ if (rem (nargs, 2) == 0) if (isnan (f) || init_new_figure) - f = __go_figure__ (f); - endif - if (nargs > 0) + f = __go_figure__ (f, varargin{:}); + elseif (nargs > 0) set (f, varargin{:}); endif set (0, "currentfigure", f);