make_subplot_layout

make_subplot_layout#

tollan.plot.plotly.make_subplot_layout(fig: Figure, layout: dict[str, Any], row: int, col: int) dict[str, Any][source]#

Create layout dict with correct axis references for a specific subplot.

Parameters:
  • fig (go.Figure) – Plotly figure with subplots.

  • layout (dict) – Layout dictionary to adapt for the subplot.

  • row (int) – Target row (1-based).

  • col (int) – Target column (1-based).

Returns:

Layout dictionary with axis references updated for the subplot.

Return type:

dict

Notes

Converts xaxis/yaxis to xaxis2/yaxis2 etc. based on subplot position.