You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite the logic for subsampling log-scale ticks, so that
1) there's as many ticks as possible without going over numticks (don't
draw a single tick when two would fit);
2) the ticks are spaced as much as possible (when two ticks are drawn,
put them on the lowest and highest decade, not somewhere midway);
3) if possible, draw ticks on integer multiples of the stride (0, 3, 9
is better than 1, 4, 7).
See comments in implementation for details.
For the backcompat-oriented "classic-mode", remove the "stride >=
numdec" check (which is a much later addition).
Test changes:
- changes because tick_values() now returns exactly one major ticks
outside of the (vmin, vmax) range on both sides: TestLogLocator,
test_axes::test_auto_numticks_log, test_colorbar::test_colorbar_renorm.
- test_small_range_loglocator was likely previously wrong (the assert
did not cover the values of ticks, and all iterations of the loop
ended up testing the same condition). Rewrite it fully (in particular
to cover the new implementation).
to be handled:
test_colorbar::test_colorbar_autotickslog: test is weird, values change
after triggering a draw anyways...
test_contour::test_contourf_log_extension: edge bins can now be wider
to respect stride, due to not starting at floor(log(vmin)) anymore...
0 commit comments