Mercurial > octave
diff libinterp/corefcn/graphics.cc @ 31238:67cad4e8f866
Include graphics objects with hidden handles in axes limit calculation (bug #63095).
* libinterp/corefcn/graphics.cc (get_children_limits): Get handles to all axes
children including those with hidden handle visibility. Add BIST.
* libinterp/corefcn/graphics.in.h (text::update_position): Do not automatically
change "zliminclude" property. Axes labels are implemented as text objects, and
we don't want their extent to be included in the axis limit calculation.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 24 Sep 2022 11:57:44 +0200 |
parents | 670a0d878af1 |
children | 332a6ccac881 |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc Wed Sep 21 09:55:32 2022 -0400 +++ b/libinterp/corefcn/graphics.cc Sat Sep 24 11:57:44 2022 +0200 @@ -8052,6 +8052,21 @@ %! unwind_protect_cleanup %! delete (hf); %! end_unwind_protect + +## Check that graphics objects with hidden handle visibility are included in +## axis limit calculation. +%!test <*63095> +%! hf = figure ("visible", "off"); +%! unwind_protect +%! hax = axes ("parent", hf); +%! plot (hax, [0, 1]); +%! assert (get (hax, "ylim"), [0, 1]); +%! hold (hax, "on"); +%! plot (hax, [2, 0], "handlevisibility", "off"); +%! assert (get (hax, "ylim"), [0, 2]); +%! unwind_protect_cleanup +%! delete (hf); +%! end_unwind_protect */ void @@ -8696,7 +8711,7 @@ != updating_aspectratios.end ())) return; - Matrix kids = m_properties.get_children (); + Matrix kids = m_properties.get_all_children (); double min_val = octave::numeric_limits<double>::Inf (); double max_val = -octave::numeric_limits<double>::Inf ();