fastplotlib.ImageGrid#

class ImageGrid(data, *, vmin=None, vmax=None, cmap='plasma', gamma=1.0, interpolation='nearest', cmap_interpolation='linear', colorspace='srgb', cpu_buffer=True, texture_usage=0, names=None, offsets=None, rotations=None, scales=None, alphas=None, alpha_modes=None, visibles=None, metadatas=None, name=None, offset=(0.0, 0.0, 0.0), rotation=(0.0, 0.0, 0.0, 1.0), scale=(1.0, 1.0, 1.0), alpha=1.0, alpha_mode='auto', visible=True, metadata=None, shape=None, separation=(0.0, 0.0))[source]#

Lay out a collection of images in a grid.

If offsets is given it is used directly as the per-image position. Otherwise the images are placed row-major into a grid of shape (rows, columns), each cell sized to the largest image so the rows and columns line up, with separation world-space gaps between them. By default there is separation space between the images.

Parameters:
  • data (list of array-like) – one image per grid cell

  • shape ((int, int), optional) – grid (n_rows, n_cols); defaults to a roughly square grid that fits all the images

  • separation ((float, float), default (0.0, 0.0)) – world-space (row, column) gaps between the images

  • offsets (array-like, optional) – explicit (x, y, z) offset per image; when given, shape and separation are ignored

  • **kwargs – passed to ImageCollection, e.g. cmap, vmin, vmax