Note

Go to the endto download the full example code.

Simple ImageGrid 2#

Align multiple images of different sizes usingImageGrid.

simple axesgrid2
importmatplotlib.pyplotaspltfrommatplotlibimportcbookfrommpl_toolkits.axes_grid1importImageGridfig=plt.figure(figsize=(5.5,3.5))grid=ImageGrid(fig,111,# similar to subplot(111)nrows_ncols=(1,3),axes_pad=0.1,label_mode="L",)# demo imageZ=cbook.get_sample_data("axes_grid/bivariate_normal.npy")im1=Zim2=Z[:,:10]im3=Z[:,10:]vmin,vmax=Z.min(),Z.max()forax,iminzip(grid,[im1,im2,im3]):ax.imshow(im,origin="lower",vmin=vmin,vmax=vmax)plt.show()

Gallery generated by Sphinx-Gallery