You are reading an old version of the documentation (v2.2.3). For the latest version see https://matplotlib.org/stable/gallery/axes_grid1/demo_imagegrid_aspect.html
Version 2.2.3
matplotlib
Fork me on GitHub

Related Topics

Demo Imagegrid AspectΒΆ

../../_images/sphx_glr_demo_imagegrid_aspect_001.png
import matplotlib.pyplot as plt

from mpl_toolkits.axes_grid1 import ImageGrid
fig = plt.figure(1)

grid1 = ImageGrid(fig, 121, (2, 2), axes_pad=0.1,
                  aspect=True, share_all=True)

for i in [0, 1]:
    grid1[i].set_aspect(2)


grid2 = ImageGrid(fig, 122, (2, 2), axes_pad=0.1,
                  aspect=True, share_all=True)


for i in [1, 3]:
    grid2[i].set_aspect(2)

plt.show()

Keywords: matplotlib code example, codex, python plot, pyplot Gallery generated by Sphinx-Gallery