add_heatmap¶

Subplot.add_heatmap(data, vmin=None, vmax=None, cmap='plasma', filter='nearest', chunk_size=8192, isolated_buffer=True, *args, **kwargs)¶

Create an Image Graphic

Parameters:
  • data (array-like) – array-like, usually numpy.ndarray, must support memoryview() Tensorflow Tensors also work probably, but not thoroughly tested | shape must be [x_dim, y_dim]

  • 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

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

  • chunk_size (int, default 8192, max 8192) – chunk size for each tile used to make up the heatmap texture

  • 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.

  • args – additional arguments passed to Graphic

  • kwargs – additional keyword arguments passed to Graphic

Return type:

HeatmapGraphic

Features

data: HeatmapDataFeature

Manages the data buffer displayed in the HeatmapGraphic

cmap: HeatmapCmapFeature

Manages the colormap

present: PresentFeature

Control the presence of the Graphic in the scene