changeset 11928:553874dbba84 release-3-0-x

Fix for hold with no figures/axes.
author David Bateman <dbateman@free.fr>
date Tue, 21 Oct 2008 21:59:59 -0400
parents 5ac4261a8f59
children ec4877888285
files scripts/ChangeLog scripts/plot/hold.m
diffstat 2 files changed, 7 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/scripts/ChangeLog
+++ b/scripts/ChangeLog
@@ -107,6 +107,10 @@
 	* statistics/distributions/chi2rnd.m: Fix another missing semicolon.
 	From sven.mattisson@insatnet.nu.
 
+2008-08-29  David Bateman  <dbateman@free.fr>
+
+	* plot/hold.m: If currentaxes if figure doesn't exist, create it.
+
 2008-10-08  John W. Eaton  <jwe@octave.org>
 
 	* miscellaneous/fileparts.m: Handle "/file" properly.
--- a/scripts/plot/hold.m
+++ b/scripts/plot/hold.m
@@ -69,6 +69,9 @@
   endif
 
   if (isfigure (h))
+    if (isempty (get (h, "currentaxes")))
+      set (h, "currentaxes", __go_axes__ (h))
+    endif
     axes_objs = findobj (h, "type", "axes");
     h = [h; axes_objs];
   endif