Mercurial > octave
changeset 31758:084bbdabb969 stable
Fix regression with xitck not updating after axis tight (bug #63624)
* graphics.cc (axes::properties::calc_ticks_and_lims): make sure min and max
ticks are within limits when xlimmode is auto as well.
author | Pantxo Diribarne <pantxo.diribarne@gmail.com> |
---|---|
date | Sun, 08 Jan 2023 15:12:27 +0100 |
parents | cf0b1426539e |
children | 39275e509f36 aaffac4fbe30 |
files | libinterp/corefcn/graphics.cc |
diffstat | 1 files changed, 6 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc Wed Jan 18 18:00:09 2023 +0100 +++ b/libinterp/corefcn/graphics.cc Sun Jan 08 15:12:27 2023 +0100 @@ -8141,6 +8141,12 @@ { tmp_lims(0) = lo; tmp_lims(1) = hi; + + // adjust min and max ticks to be within limits + if (i1*tick_sep < lo) + i1++; + if (i2*tick_sep > hi && i2 > i1) + i2--; } if (is_logscale)