Test that these all use the same gridspec
()
| 1331 | |
| 1332 | |
| 1333 | def test_reused_gridspec(): |
| 1334 | """Test that these all use the same gridspec""" |
| 1335 | fig = plt.figure() |
| 1336 | ax1 = fig.add_subplot(3, 2, (3, 5)) |
| 1337 | ax2 = fig.add_subplot(3, 2, 4) |
| 1338 | ax3 = plt.subplot2grid((3, 2), (2, 1), colspan=2, fig=fig) |
| 1339 | |
| 1340 | gs1 = ax1.get_subplotspec().get_gridspec() |
| 1341 | gs2 = ax2.get_subplotspec().get_gridspec() |
| 1342 | gs3 = ax3.get_subplotspec().get_gridspec() |
| 1343 | |
| 1344 | assert gs1 == gs2 |
| 1345 | assert gs1 == gs3 |
| 1346 | |
| 1347 | |
| 1348 | @image_comparison(['test_subfigure.png'], style='mpl20', |
nothing calls this directly
no test coverage detected
searching dependent graphs…