rekha.plots.HistogramPlot¶

class rekha.plots.HistogramPlot[source]¶

Create a histogram.

Parameters:
  • nbins (int, optional) – Number of bins (auto if None)

  • marginal (str, optional) – Type of marginal plot (‘box’, ‘violin’)

  • alpha (float, default 0.7) – Histogram transparency

  • **kwargs – Additional parameters passed to BasePlot

Methods

add_annotation(text, x, y, **kwargs)

Add annotation to the plot.

get_axes()

Get all axes from the figure.

save(filename[, format, transparent])

Save the plot to file with optimized settings for different use cases.

save_all_formats(base_name, **kwargs)

Save plot in all common formats for different use cases.

show()

Display the plot in the current output (Jupyter notebook, script, etc.).

show_legend()

Manually show the legend with appropriate styling.

update_layout(**kwargs)

Update plot layout - matplotlib style.

__init__(data=None, x=None, y=None, nbins: int | None = None, marginal: str | None = None, alpha: float = 0.7, **kwargs)[source]¶

Create a histogram.

Parameters:
  • nbins (int, optional) – Number of bins (auto if None)

  • marginal (str, optional) – Type of marginal plot (‘box’, ‘violin’)

  • alpha (float, default 0.7) – Histogram transparency

  • **kwargs – Additional parameters passed to BasePlot