Note
Go to the endto download the full example code.
ImageGrid cells with a fixed aspect ratio#

importmatplotlib.pyplotaspltfrommpl_toolkits.axes_grid1importImageGridfig=plt.figure()grid1=ImageGrid(fig,121,(2,2),axes_pad=0.1,aspect=True,share_all=True)foriin[0,1]:grid1[i].set_aspect(2)grid2=ImageGrid(fig,122,(2,2),axes_pad=0.1,aspect=True,share_all=True)foriin[1,3]:grid2[i].set_aspect(2)plt.show()