# HG changeset patch # User David Bateman # Date 1224640799 14400 # Node ID 553874dbba84d718d01edac8a77fc50c1efcd5cf # Parent 5ac4261a8f591d0a014a4ad088b08bcec0b69505 Fix for hold with no figures/axes. diff -r 5ac4261a8f59 -r 553874dbba84 scripts/ChangeLog --- a/scripts/ChangeLog Fri Jan 16 09:48:08 2009 +0100 +++ b/scripts/ChangeLog Tue Oct 21 21:59:59 2008 -0400 @@ -107,6 +107,10 @@ * statistics/distributions/chi2rnd.m: Fix another missing semicolon. From sven.mattisson@insatnet.nu. +2008-08-29 David Bateman + + * plot/hold.m: If currentaxes if figure doesn't exist, create it. + 2008-10-08 John W. Eaton * miscellaneous/fileparts.m: Handle "/file" properly. diff -r 5ac4261a8f59 -r 553874dbba84 scripts/plot/hold.m --- a/scripts/plot/hold.m Fri Jan 16 09:48:08 2009 +0100 +++ b/scripts/plot/hold.m Tue Oct 21 21:59:59 2008 -0400 @@ -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