make_subplots

Contents

make_subplots#

tollan.plot.plotly.make_subplots(n_rows: int, n_cols: int, fig_layout: dict[str, Any] | None = None, **kwargs: Any) Figure[source]#

Create a multi-panel figure with sensible defaults.

This is a wrapper around plotly.subplots.make_subplots that applies project-specific defaults like uirevision, showlegend, and autorange.

Parameters:
  • n_rows (int) – Number of rows in the subplot grid.

  • n_cols (int) – Number of columns in the subplot grid.

  • fig_layout (dict, optional) – Layout dictionary to merge with defaults.

  • **kwargs (dict) – Additional arguments passed to plotly.subplots.make_subplots.

Returns:

Plotly figure with subplot grid.

Return type:

go.Figure

Examples

>>> fig = make_subplots(2, 2, shared_xaxes=True)
>>> _ = fig.add_trace(go.Scatter(x=[1,2,3], y=[4,5,6]), row=1, col=1)