python - Is there a good solution for space efficiently showing multiple images in pylab/matplotlib? -
i looking montage.m equivalent. takes images , displays them in nice , space-efficient manner.
i looking more space-efficient subplots , can manage various colormaps. doesn't need comprehensive in link before start porting...
you may want imagegrid.
edit: made usable
import matplotlib.pyplot plt mpl_toolkits.axes_grid1 import imagegrid import numpy np im = np.arange(100) im.shape = 10, 10 images = [im in range(20)] fig = plt.figure(1, (4., 4.)) grid = imagegrid(fig, 111, nrows_ncols=(2, 10), axes_pad=0, ) in range(20): grid[i].imshow(images[i], cmap=plt.get_cmap('greys_r')) # axesgrid object work list of axes. grid[i].axis('off') plt.show(block=true)
Comments
Post a Comment