()
| 982 | |
| 983 | |
| 984 | def test_add_subplot_twotuple(): |
| 985 | fig = plt.figure() |
| 986 | ax1 = fig.add_subplot(3, 2, (3, 5)) |
| 987 | assert ax1.get_subplotspec().rowspan == range(1, 3) |
| 988 | assert ax1.get_subplotspec().colspan == range(0, 1) |
| 989 | ax2 = fig.add_subplot(3, 2, (4, 6)) |
| 990 | assert ax2.get_subplotspec().rowspan == range(1, 3) |
| 991 | assert ax2.get_subplotspec().colspan == range(1, 2) |
| 992 | ax3 = fig.add_subplot(3, 2, (3, 6)) |
| 993 | assert ax3.get_subplotspec().rowspan == range(1, 3) |
| 994 | assert ax3.get_subplotspec().colspan == range(0, 2) |
| 995 | ax4 = fig.add_subplot(3, 2, (4, 5)) |
| 996 | assert ax4.get_subplotspec().rowspan == range(1, 3) |
| 997 | assert ax4.get_subplotspec().colspan == range(0, 2) |
| 998 | with pytest.raises(IndexError): |
| 999 | fig.add_subplot(3, 2, (6, 3)) |
| 1000 | |
| 1001 | |
| 1002 | @image_comparison(['tightbbox_box_aspect.svg'], style='mpl20', |
nothing calls this directly
no test coverage detected
searching dependent graphs…