fastplotlib.ImageGraphic#

class ImageGraphic(data, vmin=None, vmax=None, cmap='plasma', interpolation='nearest', cmap_interpolation='linear', isolated_buffer=True, **kwargs)[source]#

Create an Image Graphic

Parameters:
  • data (array-like) – array-like, usually numpy.ndarray, must support memoryview() | shape must be [n_rows, n_cols], [n_rows, n_cols, 3] for RGB or [n_rows, n_cols, 4] for RGBA

  • vmin (int, optional) – minimum value for color scaling, calculated from data if not provided

  • vmax (int, optional) – maximum value for color scaling, calculated from data if not provided

  • cmap (str, optional, default "plasma") – colormap to use to display the data

  • interpolation (str, optional, default "nearest") – interpolation filter, one of “nearest” or “linear”

  • cmap_interpolation (str, optional, default "linear") – colormap interpolation method, one of “nearest” or “linear”

  • isolated_buffer (bool, default True) – If True, initialize a buffer with the same shape as the input data and then set the data, useful if the data arrays are ready-only such as memmaps. If False, the input array is itself used as the buffer.

  • kwargs – additional keyword arguments passed to Graphic

Examples#

Heatmap or large arrays

Heatmap or large arrays

Image Colormap

Image Colormap

RGB Image

RGB Image

RGB Image Vmin/Vmax

RGB Image Vmin/Vmax

Simple Image

Simple Image

Image Vmin/Vmax

Image Vmin/Vmax

Explore Covariance Matrix

Explore Covariance Matrix

K-Means Clustering of MNIST Dataset

K-Means Clustering of MNIST Dataset

Simple Image Update

Simple Image Update

Simple Event

Simple Event

Linear Selectors Image

Linear Selectors Image

Rectangle Selectors Images

Rectangle Selectors Images