When the axis is zoomed, the locator must have the same behavior as MaxNLocator.
(self, lims)
| 478 | |
| 479 | @pytest.mark.parametrize("lims", ref_maxn_limits) |
| 480 | def test_maxn_major(self, lims): |
| 481 | """ |
| 482 | When the axis is zoomed, the locator must have the same behavior as |
| 483 | MaxNLocator. |
| 484 | """ |
| 485 | loc = mticker.LogitLocator(nbins=100) |
| 486 | maxn_loc = mticker.MaxNLocator(nbins=100, steps=[1, 2, 5, 10]) |
| 487 | for nbins in (4, 8, 16): |
| 488 | loc.set_params(nbins=nbins) |
| 489 | maxn_loc.set_params(nbins=nbins) |
| 490 | ticks = loc.tick_values(*lims) |
| 491 | maxn_ticks = maxn_loc.tick_values(*lims) |
| 492 | assert ticks.shape == maxn_ticks.shape |
| 493 | assert (ticks == maxn_ticks).all() |
| 494 | |
| 495 | @pytest.mark.parametrize("lims", ref_basic_limits + ref_maxn_limits) |
| 496 | def test_nbins_major(self, lims): |
nothing calls this directly
no test coverage detected