()
| 1399 | savefig_kwarg={'facecolor': 'teal'}, |
| 1400 | tol=0.022 if sys.platform == 'darwin' else 0) |
| 1401 | def test_subfigure_ss(): |
| 1402 | # test assigning the subfigure via subplotspec |
| 1403 | np.random.seed(19680801) |
| 1404 | fig = plt.figure(layout='constrained') |
| 1405 | gs = fig.add_gridspec(1, 2) |
| 1406 | |
| 1407 | sub = fig.add_subfigure(gs[0], facecolor='pink') |
| 1408 | |
| 1409 | axs = sub.subplots(2, 2) |
| 1410 | for ax in axs.flat: |
| 1411 | pc = ax.pcolormesh(np.random.randn(30, 30), vmin=-2, vmax=2) |
| 1412 | sub.colorbar(pc, ax=axs) |
| 1413 | sub.suptitle('Left Side') |
| 1414 | |
| 1415 | ax = fig.add_subplot(gs[1]) |
| 1416 | ax.plot(np.arange(20)) |
| 1417 | ax.set_title('Axes') |
| 1418 | |
| 1419 | fig.suptitle('Figure suptitle', fontsize='xx-large') |
| 1420 | |
| 1421 | |
| 1422 | @image_comparison(['test_subfigure_double.png'], style='mpl20', |
nothing calls this directly
no test coverage detected
searching dependent graphs…