Skip to main content

plots.plot_histogram

plots.plot_histogram(
    series,
    ax=None,
    quantiles=None,
    bins=None,
    xlabel=None,
    title=None,
    normalise=False,
)

Create histograms with quantile-based color coding.

This function creates histograms with color coding based on quantile values, providing visual distinction between different ranges of the data distribution.

Args: series (pd.Series or np.ndarray): Data series to plot as histogram. ax (matplotlib.axes.Axes, optional): Axes on which to plot. If None, a new figure and axes will be created. quantiles (list, optional): Quantile values for color coding. Defaults to QUANTILES constant [0.01, 0.1, 0.9, 0.99]. bins (int, optional): Number of histogram bins. Defaults to BINS constant (50). xlabel (str, optional): Label for the x-axis. title (str, optional): Title for the plot. normalise (bool, optional): Whether to normalize the histogram counts. Defaults to False.

Returns: None: The function modifies the provided axes or creates a new plot.

Note: The function uses the viridis colormap for quantile-based coloring. Sample count is displayed in the top-right corner of the plot.