changeset 6780:38bc358b6c9a

[project @ 2007-07-18 18:02:56 by jwe]
author jwe
date Wed, 18 Jul 2007 18:04:56 +0000
parents 301ca8b69d03
children 3058060c560f
files scripts/ChangeLog scripts/plot/clf.m scripts/plot/figure.m
diffstat 3 files changed, 12 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- 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  <michael.goffioul@gmail.com>
+
+	* 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  <pkienzle@users.sf.net>
 
 	* plot/drawnow.m: Prefer GNUTERM to DISPLAY when choosing terminal
--- 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 ();
--- 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);