rekha.boxΒΆ
- rekha.box(data=None, x=None, y=None, color=None, **kwargs)[source]ΒΆ
Create a box plot with Rekha styling.
- Parameters:
data (DataFrame, dict, or None) β The data to plot
x (str, optional) β Column name for grouping variable
y (str, list, array, or None) β Column name or data for box plot values
color (str, optional) β Column name for color grouping
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:
Box plot object with matplotlib figure and axes
- Return type:
Examples
>>> import rekha as rk >>> import pandas as pd >>> import numpy as np >>> df = pd.DataFrame({ ... 'category': ['A', 'B', 'A', 'B', 'A', 'B'], ... 'values': [1, 2, 3, 4, 5, 6] ... }) >>> fig = rk.box(df, x='category', y='values', title='Box Plot') >>> fig.show()