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:

LinePlot

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