histogram
Signature
histogram(
x: ArrayLike,
*,
ddof: int | float = 0,
style: str | None = "mespy",
bins: int | str | ArrayLike = "auto",
bin_width: float | None = None,
hist_range: ArrayLike | None = None,
label: str = "Dati",
xlabel: str = "Valore",
ylabel: str | None = None,
title: str = "Istogramma",
show_bin_ticks: bool = True,
tick_rotation: int | float = 0,
decimals: int = 3,
show_mean: bool = True,
show_band: bool = True,
show_legend: bool = True,
show_grid: bool = True,
xlim: ArrayLike | None = None,
ylim: ArrayLike | None = None,
ax: Axes | None = None,
figsize: ArrayLike | None = None,
dpi: int | None = None,
save_path: str | None = None,
title_fontsize: int | float | None = None,
title_pad: int | float | None = None,
legend_fontsize: int | float | None = None,
legend_loc: str | None = None,
bar_color: str | None = None,
mean_color: str | None = None,
band_color: str | None = None,
edgecolor: str | None = None,
hist_alpha: float = 0.85,
band_alpha: float = 0.15,
grid_alpha: float | None = None,
mean_symbol: str = r"\bar{x}",
band_symbol: str = r"\pm \sigma",
) -> tuple[Figure, Axes]
histogram draws a histogram for a numeric sample and can add the mean, a +- 1 sigma band, legend, grid, and figure saving. By default it applies the mespy Matplotlib style; pass style=None to use the current rcParams, or the name of another style to delegate to Matplotlib.
I parametri figsize, dpi, title_fontsize, title_pad, legend_fontsize, legend_loc, bar_color, mean_color, band_color, edgecolor e grid_alpha possono ereditare lo stile attivo quando lasciati a None. I parametri hist_alpha, band_alpha, mean_symbol e band_symbol restano invece override espliciti della singola chiamata.
This page remains the quick entry point. Full details are in Overview, while How it works is set up as a dedicated subpage.