Heatmap
Signature
sp.heatmap(title, labels=None, values=None, *, variant="basic", col_labels=None, **kwargs) -> Chart
Description
sp.heatmap() is the unified entry point for the entire heatmap family. The variant keyword selects the rendering strategy — every other argument stays consistent across variants. Cell colors are computed in pure Rust, no NumPy required. The matrix is passed as a flat list of length len(labels) * len(col_labels) (row-major).
Parameters
| Parameter | Used by variants |
|---|---|
col_labels | bubble, cluster, marginal, pivot, unequal |
colorscale | confusion |
contour_levels | contour |
discrete_steps | discrete |
diverging | bubble, marginal, pivot |
flat_matrix | bubble, cluster, marginal, pivot |
height | bubble, marginal, pivot |
hover | bubble, marginal, pivot |
palette | categorical |
row_labels | bubble, cluster, marginal, pivot, unequal |
show_values | categorical |
title | bubble, marginal, pivot |
width | bubble, marginal, pivot |
x_widths | unequal |
y_heights | unequal |
Returns
Chart — object with .html property and .show() method.