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

Histogram Charts

Signature

sp.histogram(title, values, *, variant="basic", bins=0, overlay_values=None, color_groups=None, series_names=None, **kwargs) -> Chart

Description

sp.histogram() is the unified entry point for the entire histogram family. The variant keyword selects the rendering strategy — every other argument keeps the same name across variants. Histograms are the canonical way to visualize the distribution of a single numeric variable; SeraPlot adds horizontal layout, density normalization, cumulative distribution, stacked groups, A/B overlay and step outline — all in pure Rust SVG, thousands of times faster than Plotly.

Parameters

ParameterUsed by variants
binsall
categoriesoverlay, stacked
colorbasic, cumulative, horizontal, normalized, overlay, step
count_scalebasic
gapbasic, deluxe, horizontal, normalized, overlay, stacked
gridlinesall
heightall
hoverall
opacitybasic, cumulative, horizontal, normalized
overlay_colorbasic, overlay
overlay_valuesbasic, overlay
paletteoverlay, stacked
series_namesbasic, overlay
show_countsbasic, deluxe, horizontal
sort_orderbasic
stroke_widthstep
titleall
valuesall
widthall
x_labelbasic, cumulative, horizontal, normalized, overlay, stacked, step
y_labelbasic, cumulative, horizontal, normalized, overlay, stacked, step

Returns

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


Signature

sp.histogram(title, values, *, variant="basic", bins=0, overlay_values=None, color_groups=None, series_names=None, **kwargs) -> Chart

Description

sp.histogram() est le point d'entrée unifié de toute la famille histogramme. 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 histogrammes sont la façon canonique de visualiser la distribution d'une variable numérique ; SeraPlot ajoute layout horizontal, normalisation densité, distribution cumulative, groupes empilés, superposition A/B et contour en escalier — le tout en SVG Rust pur, des milliers de fois plus rapide que Plotly.

Paramètres

ParamètreUtilisé par variantes
binstoutes
categoriesoverlay, stacked
colorbasic, cumulative, horizontal, normalized, overlay, step
count_scalebasic
gapbasic, deluxe, horizontal, normalized, overlay, stacked
gridlinestoutes
heighttoutes
hovertoutes
opacitybasic, cumulative, horizontal, normalized
overlay_colorbasic, overlay
overlay_valuesbasic, overlay
paletteoverlay, stacked
series_namesbasic, overlay
show_countsbasic, deluxe, horizontal
sort_orderbasic
stroke_widthstep
titletoutes
valuestoutes
widthtoutes
x_labelbasic, cumulative, horizontal, normalized, overlay, stacked, step
y_labelbasic, cumulative, horizontal, normalized, overlay, stacked, step

Retour

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