rekha.heatmapΒΆ

rekha.heatmap(data=None, x=None, y=None, z=None, **kwargs)[source]ΒΆ

Create a heatmap with Rekha styling.

Parameters:
  • data (DataFrame or array) – The data to plot

  • x (list, optional) – Column labels

  • y (list, optional) – Row labels

  • z (array, optional) – 2D array of values (if not using DataFrame)

  • text_auto (bool, default False) – Whether to show values in cells

  • color_continuous_scale (str, optional) – Colormap name

  • 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 axes 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 use grayscale for grayscale printing

  • **kwargs – Additional styling parameters

Returns:

Heatmap plot object with matplotlib figure and axes

Return type:

HeatmapPlot

Examples

>>> import rekha as rk
>>> import pandas as pd
>>> import numpy as np
>>> data = np.random.rand(5, 5)
>>> fig = rk.heatmap(data, title='Correlation Matrix')
>>> fig.show()