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:

HistogramPlot

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()