matplotlib: Controling dimensions in mosaic

Viewed 28

I used this code from the documentation to create a mosaic. How do I control the heights of figures individually now?

fig, axs = plt.subplot_mosaic([['a)', 'b)'], ['c)', 'c)']],constrained_layout = True)
for label, ax in axs.items():
    # label physical distance to the left and up:
    trans = mtransforms.ScaledTranslation(-20/72, 7/72, fig.dpi_scale_trans)
    ax.text(0.0, 1.0, label, transform=ax.transAxes + trans,
            fontsize='medium', va='bottom', fontfamily='serif')


plt.show()
0 Answers
Related