(fig_test, fig_ref)
| 5718 | |
| 5719 | @check_figures_equal() |
| 5720 | def test_axline_transaxes_panzoom(fig_test, fig_ref): |
| 5721 | # test that it is robust against pan/zoom and |
| 5722 | # figure resize after plotting |
| 5723 | ax = fig_test.subplots() |
| 5724 | ax.set(xlim=(-1, 1), ylim=(-1, 1)) |
| 5725 | ax.axline((0, 0), slope=1, transform=ax.transAxes) |
| 5726 | ax.axline((0.5, 0.5), slope=2, color='C1', transform=ax.transAxes) |
| 5727 | ax.axline((0.5, 0.5), slope=0, color='C2', transform=ax.transAxes) |
| 5728 | ax.set(xlim=(0, 5), ylim=(0, 10)) |
| 5729 | fig_test.set_size_inches(3, 3) |
| 5730 | |
| 5731 | ax = fig_ref.subplots() |
| 5732 | ax.set(xlim=(0, 5), ylim=(0, 10)) |
| 5733 | fig_ref.set_size_inches(3, 3) |
| 5734 | ax.plot([0, 5], [0, 5]) |
| 5735 | ax.plot([0, 5], [0, 10], color='C1') |
| 5736 | ax.plot([0, 5], [5, 5], color='C2') |
| 5737 | |
| 5738 | |
| 5739 | def test_axline_args(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…