()
| 8747 | |
| 8748 | |
| 8749 | def test_nodecorator(): |
| 8750 | with rc_context({'_internal.classic_mode': False}): |
| 8751 | fig, ax = plt.subplots(dpi=200, figsize=(6, 6)) |
| 8752 | fig.canvas.draw() |
| 8753 | ax.set(xticklabels=[], yticklabels=[]) |
| 8754 | bbaxis, bbspines, bbax, bbtb = color_boxes(fig, ax) |
| 8755 | |
| 8756 | # test the axis bboxes |
| 8757 | for nn, b in enumerate(bbaxis): |
| 8758 | assert b is None |
| 8759 | |
| 8760 | target = [ |
| 8761 | [150.0, 119.999, 930.0, 11.111], |
| 8762 | [150.0, 1080.0, 930.0, 0.0], |
| 8763 | [150.0, 119.9999, 11.111, 960.0], |
| 8764 | [1068.8888, 119.9999, 11.111, 960.0] |
| 8765 | ] |
| 8766 | for nn, b in enumerate(bbspines): |
| 8767 | targetbb = mtransforms.Bbox.from_bounds(*target[nn]) |
| 8768 | assert_allclose(b.bounds, targetbb.bounds, atol=1e-2) |
| 8769 | |
| 8770 | target = [150.0, 119.99999999999997, 930.0, 960.0] |
| 8771 | targetbb = mtransforms.Bbox.from_bounds(*target) |
| 8772 | assert_allclose(bbax.bounds, targetbb.bounds, atol=1e-2) |
| 8773 | |
| 8774 | target = [150., 120., 930., 960.] |
| 8775 | targetbb = mtransforms.Bbox.from_bounds(*target) |
| 8776 | assert_allclose(bbtb.bounds, targetbb.bounds, atol=1e-2) |
| 8777 | |
| 8778 | |
| 8779 | def test_displaced_spine(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…