Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

SPLOM — Scatter Plot Matrix

Signature

sp.splom(title, axes, series, *, variant="basic", colorscale=None, **kwargs) -> Chart

Aliases: sp.splom, sp.scatter_matrix, sp.splom_chart, sp.pairplot, sp.scatterplot_matrix, sp.build_splom

Description

sp.splom() lays out every pairwise combination of a set of numeric dimensions as an M×M grid of small scatter plots in a single self-contained chart — the standard first look at a multivariate numeric dataset. It reuses exactly the same row-major data shape as parallel() (axes + series, one row per observation with one value per axis), so any dataset already wired up for parallel coordinates works unchanged. Diagonal cells show the axis name instead of a self-scatter.

Variants

Data

axes (list[str]) — Dimension names. series (list[list[float]]) — One row per observation, one value per dimension.

Parameters

Themes

Returns

Chart — object with .html property and .show() method.

Off-diagonal cells are plain scatter plots in a single palette color.

Variant "basic"Aliases basic / default / classic / dots
Preview

Each off-diagonal cell's background is tinted by the Pearson correlation coefficient between its two dimensions (via the same continuous colorscale engine as [`heatmap()`](heatmap.md)), with points overlaid in a neutral color — a heatmap and a SPLOM in one chart.

Variant "correlation"Aliases correlation / corr / heat / shaded
Preview

Every point drawn at 14% opacity with no stroke — overlapping points accumulate into darker regions, revealing density in datasets too large for solid dots to stay readable.

Variant "density"Aliases density / alpha / overplot / cloud
Preview

Adds a least-squares trend line to every off-diagonal panel — the classic pairplot-with-regression view for spotting linear relationships across every pair of variables at once.

Variant "regression"Aliases regression / trend / fit / lm
Preview