rekha.histogramΒΆ
- rekha.histogram(data=None, x=None, **kwargs)[source]ΒΆ
Create a histogram with Rekha styling.
- Parameters:
data (DataFrame, dict, or None) β The data to plot
x (str, list, array, or None) β Column name or data for histogram
nbins (int, optional) β Number of bins (auto if None)
marginal (str, optional) β Type of marginal plot (βboxβ, βviolinβ)
alpha (float, default 0.7) β Histogram transparency
facet_col (str, optional) β Column to use for creating subplots (facets)
facet_row (str, optional) β Column to use for creating subplot rows
title (str, optional) β Plot title
labels (dict, optional) β Dictionary mapping column names to display labels
dark_mode (bool, default False) β Whether to use dark theme
figsize (tuple, default (10, 6)) β Figure size (width, height)
grayscale_friendly (bool, default False) β Whether to add patterns for grayscale printing
**kwargs β Additional styling parameters
- Returns:
Histogram plot object with matplotlib figure and axes
- Return type:
Examples
>>> import rekha as rk >>> import pandas as pd >>> df = pd.DataFrame({'values': [1,2,2,3,3,3,4,4,5]}) >>> fig = rk.histogram(df, x='values', title='Distribution') >>> fig.show()