rekha.subplotsΒΆ

rekha.subplots(rows: int = 1, cols: int = 1, dark_mode: bool = False, figsize: Tuple[float, float] | None = None, **kwargs) Tuple[Figure, Axes | ndarray][source]ΒΆ

Create subplots with Rekha theme.

Parameters:
  • rows (int, default 1) – Number of rows of subplots

  • cols (int, default 1) – Number of columns of subplots

  • dark_mode (bool, default False) – Whether to use dark theme

  • figsize (tuple, optional) – Figure size (width, height). If None, auto-calculated

  • **kwargs – Additional arguments passed to plt.subplots

Returns:

  • fig (matplotlib.figure.Figure) – The figure object

  • axes (matplotlib.axes.Axes or numpy.ndarray) – The axes object(s)

Examples

>>> import rekha as rk
>>> fig, axes = rk.subplots(2, 2, figsize=(12, 8))
>>> # Use axes[0, 0], axes[0, 1], etc. for individual plots