plot_heatmap

gtda.plotting.plot_heatmap(data, x=None, y=None, colorscale='greys', origin='upper', title=None)[source]

Plot a 2D single-channel image, as a heat map from 2D array data.

Parameters
  • data (ndarray of shape (n_pixels_x, n_pixels_y)) – Data describing the heat map value-to-color mapping.

  • x (ndarray of shape (n_pixels_x,) or None, optional, default: None) – Horizontal coordinates of the pixels in data.

  • y (ndarray of shape (n_pixels_y,) or None, optional, default: None) – Vertical coordinates of the pixels in data.

  • colorscale (str, optional, default: 'greys') – Color scale to be used in the heat map. Can be anything allowed by plotly.graph_objects.Heatmap.

  • origin ('upper' | 'lower', optional, default: 'upper') – Position of the [0, 0] pixel of data, in the upper left or lower left corner. The convention 'upper' is typically used for matrices and images.

  • title (str or None, optional, default: None) – Title of the resulting figure.