()
| 8777 | |
| 8778 | |
| 8779 | def test_displaced_spine(): |
| 8780 | with rc_context({'_internal.classic_mode': False}): |
| 8781 | fig, ax = plt.subplots(dpi=200, figsize=(6, 6)) |
| 8782 | ax.set(xticklabels=[], yticklabels=[]) |
| 8783 | ax.spines.bottom.set_position(('axes', -0.1)) |
| 8784 | fig.canvas.draw() |
| 8785 | bbaxis, bbspines, bbax, bbtb = color_boxes(fig, ax) |
| 8786 | |
| 8787 | targets = [ |
| 8788 | [150., 24., 930., 11.111111], |
| 8789 | [150.0, 1080.0, 930.0, 0.0], |
| 8790 | [150.0, 119.9999, 11.111, 960.0], |
| 8791 | [1068.8888, 119.9999, 11.111, 960.0] |
| 8792 | ] |
| 8793 | for target, bbspine in zip(targets, bbspines): |
| 8794 | targetbb = mtransforms.Bbox.from_bounds(*target) |
| 8795 | assert_allclose(bbspine.bounds, targetbb.bounds, atol=1e-2) |
| 8796 | |
| 8797 | target = [150.0, 119.99999999999997, 930.0, 960.0] |
| 8798 | targetbb = mtransforms.Bbox.from_bounds(*target) |
| 8799 | assert_allclose(bbax.bounds, targetbb.bounds, atol=1e-2) |
| 8800 | |
| 8801 | target = [150., 24., 930., 1056.] |
| 8802 | targetbb = mtransforms.Bbox.from_bounds(*target) |
| 8803 | assert_allclose(bbtb.bounds, targetbb.bounds, atol=1e-2) |
| 8804 | |
| 8805 | |
| 8806 | def test_tickdirs(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…