archetypes.visualization.heatmap#

archetypes.visualization.heatmap(data, labels=None, n_archetypes=None, scores=None, ax=None, **kwargs)#

Plot a heatmap of the data. If labels are provided, the heatmap is divided into cells.

Parameters:
data: np.ndarray

The data to plot.

labels: list of np.ndarray or None

The labels values to use for the plot. If None, the labels values are computed from the labels.

n_archetypes: list of int or None

The number of archetypes for each dimension. If None, the number of archetypes is computed from the labels.

scores: list of np.ndarray or None

The scores values to use for the plot.

ax: matplotlib.pyplot.axes or None

The axes to plot on. If None, a new figure and axes is created.

kwargs: dict

Additional keyword arguments to pass to the heatmap.

Returns:
ax: matplotlib.pyplot.axes

The axes.