Mercurial > octave
changeset 26712:f8e7c1750222
Fix auto axes limits with text on negative logarithmic axes.
* graphics.in.h (text::update_position): Provide value for max_neg calculation.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 09 Feb 2019 21:47:01 +0100 |
parents | b3ba2487dc7e |
children | 4a11a8ae0a04 |
files | libinterp/corefcn/graphics.in.h |
diffstat | 1 files changed, 7 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.in.h Sat Feb 09 20:02:59 2019 +0000 +++ b/libinterp/corefcn/graphics.in.h Sat Feb 09 21:47:01 2019 +0100 @@ -4405,19 +4405,23 @@ Matrix pos = get_data_position (); Matrix lim; - lim = Matrix (1, 3, pos(0)); + lim = Matrix (1, 4, pos(0)); lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2)); + lim(3) = (lim(3) >= 0 ? -octave::numeric_limits<double>::Inf () : lim(3)); set_xlim (lim); - lim = Matrix (1, 3, pos(1)); + lim = Matrix (1, 4, pos(1)); lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2)); + lim(3) = (lim(3) >= 0 ? -octave::numeric_limits<double>::Inf () : lim(3)); set_ylim (lim); if (pos.numel () == 3) { - lim = Matrix (1, 3, pos(2)); + lim = Matrix (1, 4, pos(2)); lim(2) = (lim(2) <= 0 ? octave::numeric_limits<double>::Inf () : lim(2)); + lim(3) = (lim(3) >= 0 ? -octave::numeric_limits<double>::Inf () + : lim(3)); set_zliminclude ("on"); set_zlim (lim); }