Switch the tickdirs and make sure the bboxes switch with them
()
| 8804 | |
| 8805 | |
| 8806 | def test_tickdirs(): |
| 8807 | """ |
| 8808 | Switch the tickdirs and make sure the bboxes switch with them |
| 8809 | """ |
| 8810 | targets = [[[150.0, 120.0, 930.0, 11.1111], |
| 8811 | [150.0, 120.0, 11.111, 960.0]], |
| 8812 | [[150.0, 108.8889, 930.0, 11.111111111111114], |
| 8813 | [138.889, 120, 11.111, 960.0]], |
| 8814 | [[150.0, 114.44444444444441, 930.0, 11.111111111111114], |
| 8815 | [144.44444444444446, 119.999, 11.111, 960.0]]] |
| 8816 | for dnum, dirs in enumerate(['in', 'out', 'inout']): |
| 8817 | with rc_context({'_internal.classic_mode': False}): |
| 8818 | fig, ax = plt.subplots(dpi=200, figsize=(6, 6)) |
| 8819 | ax.tick_params(direction=dirs) |
| 8820 | fig.canvas.draw() |
| 8821 | bbaxis, bbspines, bbax, bbtb = color_boxes(fig, ax) |
| 8822 | for nn, num in enumerate([0, 2]): |
| 8823 | targetbb = mtransforms.Bbox.from_bounds(*targets[dnum][nn]) |
| 8824 | assert_allclose( |
| 8825 | bbspines[num].bounds, targetbb.bounds, atol=1e-2) |
| 8826 | |
| 8827 | |
| 8828 | def test_minor_accountedfor(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…