# HG changeset patch # User jwe # Date 1183044344 0 # Node ID e6b528a3a2a93a1db4d2382415c1fab7d3def486 # Parent 2a83fce5a09737534d070145b1db9ba647c75aec [project @ 2007-06-28 15:25:43 by jwe] diff -r 2a83fce5a097 -r e6b528a3a2a9 scripts/ChangeLog --- a/scripts/ChangeLog Wed Jun 27 19:02:59 2007 +0000 +++ b/scripts/ChangeLog Thu Jun 28 15:25:44 2007 +0000 @@ -1,3 +1,10 @@ +2007-06-28 Michael Goffioul + + * plot/subplot.m: Add 'ishandle' check when parsing the existing axes. + + * plot/axis.m: Also set "visible" property when setting axes to + on/off. + 2007-06-27 Michael Goffioul * image/colormap.m: Only return colormap if nargout > 0. diff -r 2a83fce5a097 -r e6b528a3a2a9 scripts/plot/axis.m --- a/scripts/plot/axis.m Wed Jun 27 19:02:59 2007 +0000 +++ b/scripts/plot/axis.m Thu Jun 28 15:25:44 2007 +0000 @@ -178,8 +178,10 @@ set (ca, "xtickmode", "auto", "ytickmode", "auto", "ztickmode", "auto"); set (ca, "xticklabelmode", "auto", "yticklabelmode", "auto", "zticklabelmode", "auto"); + set (ca, "visible", "on"); elseif (strcmp (ax, "off")) set (ca, "xtick", [], "ytick", [], "ztick", []); + set (ca, "visible", "off"); elseif (len > 3 && strcmp (ax(1:3), "tic")) if (any (ax == "x")) set (ca, "xtickmode", "auto"); diff -r 2a83fce5a097 -r e6b528a3a2a9 scripts/plot/subplot.m --- a/scripts/plot/subplot.m Wed Jun 27 19:02:59 2007 +0000 +++ b/scripts/plot/subplot.m Thu Jun 28 15:25:44 2007 +0000 @@ -120,6 +120,13 @@ found = false; for child = obj.children + ## Check if this child is still valid; this might not be the case + ## anymore due to the deletion of previous children (due to DeleteFcn + ## callback or for legends/colorbars that get deleted with their + ## corresponding axes) + if (! ishandle (child)) + continue; + endif obj = get (child); if (strcmp (obj.type, "axes")) objpos = obj.outerposition; diff -r 2a83fce5a097 -r e6b528a3a2a9 src/ChangeLog --- a/src/ChangeLog Wed Jun 27 19:02:59 2007 +0000 +++ b/src/ChangeLog Thu Jun 28 15:25:44 2007 +0000 @@ -1,3 +1,10 @@ +2007-06-28 John W. Eaton + + * graphics.h (axes::axes_properties::visible): New data member. + * graphics.cc (axes::axes_properties::axes_properties, + axes::axes_properties::set, axes::axes_properties::get, + axes::axes_properties::factory_defaults): Handle visible property. + 2007-06-27 Kai Habel * graphics.h (color_values::color_values): Arg is now std:string diff -r 2a83fce5a097 -r e6b528a3a2a9 src/graphics.cc --- a/src/graphics.cc Wed Jun 27 19:02:59 2007 +0000 +++ b/src/graphics.cc Thu Jun 28 15:25:44 2007 +0000 @@ -921,6 +921,7 @@ ydir ("normal"), zdir ("normal"), view (), + visible ("on"), nextplot ("replace"), outerposition () { @@ -1108,6 +1109,8 @@ zdir = val; else if (name.compare ("view")) view = val; + else if (name.compare ("visible")) + visible = val; else if (name.compare ("nextplot")) nextplot = val; else if (name.compare ("outerposition")) @@ -1176,6 +1179,7 @@ tview(1) = 90; view = tview; + visible = "on"; nextplot = "replace"; // FIXME -- this is not quite right; we should preserve @@ -1259,6 +1263,7 @@ m.assign ("ydir", ydir); m.assign ("zdir", zdir); m.assign ("view", view); + m.assign ("visible", visible); m.assign ("nextplot", nextplot); m.assign ("outerposition", outerposition); @@ -1382,6 +1387,8 @@ retval = zdir; else if (name.compare ("view")) retval = view; + else if (name.compare ("visible")) + retval = visible; else if (name.compare ("nextplot")) retval = nextplot; else if (name.compare ("outerposition")) @@ -1481,6 +1488,7 @@ m["view"] = tview; + m["visible"] = "on"; m["nextplot"] = "replace"; Matrix touterposition (1, 4, 0.0); diff -r 2a83fce5a097 -r e6b528a3a2a9 src/graphics.h --- a/src/graphics.h Wed Jun 27 19:02:59 2007 +0000 +++ b/src/graphics.h Thu Jun 28 15:25:44 2007 +0000 @@ -1208,6 +1208,7 @@ OCTAVE_GRAPHICS_PROPERTY (octave_value, ydir); OCTAVE_GRAPHICS_PROPERTY (octave_value, zdir); OCTAVE_GRAPHICS_PROPERTY (octave_value, view); + OCTAVE_GRAPHICS_PROPERTY (octave_value, visible); OCTAVE_GRAPHICS_PROPERTY (octave_value, nextplot); OCTAVE_GRAPHICS_PROPERTY (octave_value, outerposition);