()
| 8826 | |
| 8827 | |
| 8828 | def test_minor_accountedfor(): |
| 8829 | with rc_context({'_internal.classic_mode': False}): |
| 8830 | fig, ax = plt.subplots(dpi=200, figsize=(6, 6)) |
| 8831 | fig.canvas.draw() |
| 8832 | ax.tick_params(which='both', direction='out') |
| 8833 | |
| 8834 | bbaxis, bbspines, bbax, bbtb = color_boxes(fig, ax) |
| 8835 | bbaxis, bbspines, bbax, bbtb = color_boxes(fig, ax) |
| 8836 | targets = [[150.0, 108.88888888888886, 930.0, 11.111111111111114], |
| 8837 | [138.8889, 119.9999, 11.1111, 960.0]] |
| 8838 | for n in range(2): |
| 8839 | targetbb = mtransforms.Bbox.from_bounds(*targets[n]) |
| 8840 | assert_allclose( |
| 8841 | bbspines[n * 2].bounds, targetbb.bounds, atol=1e-2) |
| 8842 | |
| 8843 | fig, ax = plt.subplots(dpi=200, figsize=(6, 6)) |
| 8844 | fig.canvas.draw() |
| 8845 | ax.tick_params(which='both', direction='out') |
| 8846 | ax.minorticks_on() |
| 8847 | ax.tick_params(axis='both', which='minor', length=30) |
| 8848 | fig.canvas.draw() |
| 8849 | bbaxis, bbspines, bbax, bbtb = color_boxes(fig, ax) |
| 8850 | targets = [[150.0, 36.66666666666663, 930.0, 83.33333333333334], |
| 8851 | [66.6667, 120.0, 83.3333, 960.0]] |
| 8852 | |
| 8853 | for n in range(2): |
| 8854 | targetbb = mtransforms.Bbox.from_bounds(*targets[n]) |
| 8855 | assert_allclose( |
| 8856 | bbspines[n * 2].bounds, targetbb.bounds, atol=1e-2) |
| 8857 | |
| 8858 | |
| 8859 | @check_figures_equal() |
nothing calls this directly
no test coverage detected
searching dependent graphs…