ogstools.plot.heatmaps module#

heatmap functions.

ogstools.plot.heatmaps.heatmap(data, variable, fig=None, ax=None, x_vals=None, y_vals=None, **kwargs)[source]#

Create a heatmap plot of given data.

Parameters:
  • data (ndarray) – The two-dimensional data of interest.

  • variable (Variable) – Provides the label and colormap for the colorbar.

  • fig (Figure | None) – Optionally plot into this figure.

  • ax (Axes | None) – Optionally plot into this Axes.

  • x_vals (ndarray | None) – one-dimensional x_values of the data.

  • y_vals (ndarray | None) – one-dimensional y_values of the data.

Return type:

Figure | None

Keyword Arguments:
  • figsize: figure size

  • dpi: resolution

  • vmin: minimum value of the colorbar

  • vmax: maximum value of the colorbar

  • num_levels: Number of levels (approximation)

  • log_scale: If True, use logarithmic sclaing

  • aspect: Aspect ratio of the plt.Axes (y/x)

  • fontsize: fontsize

Returns:

A figure with a heatmap

Return type:

Figure | None