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