SubplotGrid#
- class tollan.plot.plotly.SubplotGrid(subplots: list[~tollan.plot.plotly._Subplot] = <factory>, fig_layout: dict = <factory>)[source]#
Bases:
objectA helper class to build multi panel figure.
Attributes Summary
The grid specifications and subplot locations.
The shape of the grid as (n_rows, n_cols).
Methods Summary
add_subplot(row, col[, fig, spec, ...])Add figure to the subplots.
make_figure([fig_layout])Create a figure composed from all subplots.
Attributes Documentation
- shape#
The shape of the grid as (n_rows, n_cols).
Methods Documentation
- add_subplot(row: int, col: int, fig: Figure | None = None, spec: _SubplotSpec | None = None, row_height: float | None = None, col_width: float | None = None, title: str | None = None) None[source]#
Add figure to the subplots.
- Parameters:
row (int) – Row index (1-based).
col (int) – Column index (1-based).
fig (go.Figure, optional) – Plotly figure to add to this subplot.
spec (dict, optional) – Subplot specification with type, rowspan, colspan.
row_height (float, optional) – Relative height of this row.
col_width (float, optional) – Relative width of this column.
title (str, optional) – Title for this subplot.