Mercurial > octave
changeset 31764:63de4cc96c5d stable
test: Add self test for auto xticks with tight axis limits (bug #63264).
* libinterp/corefcn/graphics.cc (axes): Add BIST for auto xticks with tight
axis limits.
author | Markus Mützel <markus.muetzel@gmx.de> |
---|---|
date | Sat, 21 Jan 2023 14:01:41 +0100 |
parents | aaffac4fbe30 |
children | faf5d5960732 74aa32d5fd08 |
files | libinterp/corefcn/graphics.cc |
diffstat | 1 files changed, 14 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/corefcn/graphics.cc Fri Jan 20 15:07:17 2023 +0100 +++ b/libinterp/corefcn/graphics.cc Sat Jan 21 14:01:41 2023 +0100 @@ -8068,6 +8068,20 @@ %! unwind_protect_cleanup %! delete (hf); %! end_unwind_protect + +## Check automatically determined axes ticks with "tickaligned" (default) and +## "tight" xlimitmethod. +%!test <*63624> +%! hf = figure ("visible", "off"); +%! unwind_protect +%! hax = axes ("parent", hf); +%! plot (hax, [1, 201], [0, 1]); +%! assert (get (hax, "xtick"), 0:50:250); +%! axis (hax, "tight"); +%! assert (get (hax, "xtick"), 50:50:200); +%! unwind_protect_cleanup +%! delete (hf); +%! end_unwind_protect */ void