rekha.lineΒΆ
- rekha.line(data=None, x=None, y=None, **kwargs)[source]ΒΆ
Create a line plot with Rekha styling.
- Parameters:
data (DataFrame, dict, or None) β The data to plot
x (str, list, array, or None) β Column names or data for x and y axes
y (str, list, array, or None) β Column names or data for x and y axes
color (str, optional) β Column name for color grouping
facet_row (str, optional) β Column name for creating subplot rows
facet_col (str, optional) β Column name for creating subplot columns
line_width (float, default 2.0) β Width of the lines
line_style (str, default '-') β Line style (β-β, βββ, β-.β, β:β)
markers (bool, default False) β Whether to show markers at data points
marker_size (float, default 6.0) β Size of markers if enabled
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:
Line plot object with matplotlib figure and axes
- Return type:
Examples
>>> import rekha as rk >>> import pandas as pd >>> df = pd.DataFrame({'x': [1,2,3], 'y': [1,4,2]}) >>> fig = rk.line(df, x='x', y='y', title='My Line Plot') >>> fig.show()