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

KDE — Kernel Density Estimate

Signature

sp.kde(title, values, *, variant="basic", categories=None, bandwidth=0.0, filled=True, fill_opacity=50, bins=30, n_points=80, palette=None, **kwargs) -> Chart

Description

sp.kde() is the unified entry point for the entire Kernel Density Estimate family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. KDE produces a smooth, continuous density estimate from a sample of points using a Gaussian kernel with Scott's rule for automatic bandwidth selection. SeraPlot renders the curves as pure Rust SVG, with native multi-series, normalization, CDF, rug, histogram overlay and gradient fills.

Parameters

ParameterUsed by variants
bandwidthall
binshistogram
fill_opacitybasic, normalized, rug, stepped
filledbasic, normalized, rug
gridlinesall
heightall
hoverall
n_pointsall
paletteall
titleall
widthall
x_labelall
y_labelall

Returns

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


Signature

sp.kde(title, values, *, variant="basic", categories=None, bandwidth=0.0, filled=True, fill_opacity=50, bins=30, n_points=80, palette=None, **kwargs) -> Chart

Description

sp.kde() est le point d'entrée unifié pour toute la famille KDE (Kernel Density Estimate). 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. La KDE produit une estimation de densité continue lissée à partir d'un échantillon de points avec un noyau gaussien et la règle de Scott pour le choix automatique de la bande passante. SeraPlot rend les courbes en SVG Rust natif, avec multi-séries, normalisation, CDF, rug, histogramme superposé et remplissage en dégradé.

Paramètres

ParamètreUtilisé par variantes
bandwidthtoutes
binshistogram
fill_opacitybasic, normalized, rug, stepped
filledbasic, normalized, rug
gridlinestoutes
heighttoutes
hovertoutes
n_pointstoutes
palettetoutes
titletoutes
widthtoutes
x_labeltoutes
y_labeltoutes

Retour

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