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

Scatter Charts

Signature

sp.scatter(title, x_values, y_values, *, variant="basic", categories=None, labels=None, color_values=None, **kwargs) -> Chart

Description

sp.scatter() is the unified entry point for the entire scatter family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. Scatter plots are the canonical way to display the joint distribution of two numeric variables; SeraPlot adds optional grouping, continuous color, distinct marker shapes, on-point labels and OLS regression — all in pure Rust SVG, thousands of times faster than Plotly.

Parameters

ParameterUsed by variants
categoriescategorical, labeled, symbols
color_hexbasic, labeled, regression, symbols
color_highgradient, regression
color_lowgradient
color_valuesgalaxy, gradient, nova
gridlinesall
hoverall
labelsbasic, deluxe, galaxy, gradient, labeled, nova, regression
palettecategorical, labeled, symbols
point_sizeall
regression_typeregression
stroke_widthbasic, categorical, gradient, labeled, regression, symbols
symbolbasic, categorical, gradient, labeled, regression
symbolssymbols
titleall
widthcategorical, gradient, symbols
x_labelall
x_valuesall
y_labelall
y_valuesall

Returns

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


Signature

sp.scatter(title, x_values, y_values, *, variant="basic", categories=None, labels=None, color_values=None, **kwargs) -> Chart

Description

sp.scatter() est le point d'entrée unifié de toute la famille scatter. Le mot-clé variant sélectionne la stratégie de rendu — tous les autres arguments gardent le même nom d'une variante à l'autre. Les nuages de points sont la façon canonique d'afficher la distribution conjointe de deux variables numériques ; SeraPlot ajoute groupement optionnel, couleur continue, formes de marqueurs distinctes, étiquettes sur les points et régression OLS — le tout en SVG Rust pur, des milliers de fois plus rapide que Plotly.

Paramètres

ParamètreUtilisé par variantes
categoriescategorical, labeled, symbols
color_hexbasic, labeled, regression, symbols
color_highgradient, regression
color_lowgradient
color_valuesgalaxy, gradient, nova
gridlinestoutes
hovertoutes
labelsbasic, deluxe, galaxy, gradient, labeled, nova, regression
palettecategorical, labeled, symbols
point_sizetoutes
regression_typeregression
stroke_widthbasic, categorical, gradient, labeled, regression, symbols
symbolbasic, categorical, gradient, labeled, regression
symbolssymbols
titletoutes
widthcategorical, gradient, symbols
x_labeltoutes
x_valuestoutes
y_labeltoutes
y_valuestoutes

Retour

Chart — objet exposant .html et .show().