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

Ridgeline — Joyplot / Stacked KDE

Signature

sp.ridgeline(title, categories, values, *, variant="basic", overlap=0.5, bandwidth=0.0, n_points=60, fill_opacity=56, palette=None, **kwargs) -> Chart

Description

sp.ridgeline() is the unified entry point for the entire ridgeline family — also known as joyplot. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. A ridgeline plot stacks one KDE curve per category along a shared X axis with a controllable vertical overlap, making it ideal to compare distributions across many groups (years, regions, segments…). SeraPlot renders everything in pure Rust SVG, with quartile/mean overlays, rug ticks, gradient fills and a built-in viridis colormap.

Parameters

ParameterUsed by variants
fill_opacitybasic, mean, quartiles, rug, spaced
heightdeluxe
palettebasic, gradient, heatmap, lines, mean, quartiles, rug, spaced
titledeluxe
widthdeluxe

Returns

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


Signature

sp.ridgeline(title, categories, values, *, variant="basic", overlap=0.5, bandwidth=0.0, n_points=60, fill_opacity=56, palette=None, **kwargs) -> Chart

Description

sp.ridgeline() est le point d'entrée unifié pour toute la famille ridgeline — aussi appelé joyplot. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments conservent le même nom d'une variante à l'autre. Un ridgeline empile une courbe KDE par catégorie sur un axe X partagé avec un recouvrement vertical réglable, idéal pour comparer des distributions à travers plusieurs groupes (années, régions, segments…). SeraPlot rend tout en SVG Rust natif, avec marqueurs quartiles/moyenne, ticks rug, dégradés et palette viridis intégrée.

Paramètres

ParamètreUtilisé par variantes
fill_opacitybasic, mean, quartiles, rug, spaced
heightdeluxe
palettebasic, gradient, heatmap, lines, mean, quartiles, rug, spaced
titledeluxe
widthdeluxe

Retour

Chart — objet avec propriété .html et méthode .show().