adjust_subplot_colorbars

adjust_subplot_colorbars#

tollan.plot.plotly.adjust_subplot_colorbars(fig: Figure, size: float = 1.0) Figure[source]#

Adjust colorbar positions to align with subplot axes.

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

  • size (float, default 1.0) – Fraction of subplot height for colorbar length.

Returns:

Figure with adjusted colorbar positions.

Return type:

go.Figure

Notes

This function repositions colorbars to align with their corresponding subplot’s vertical extent, which is particularly useful for multi-panel figures where default colorbar positioning can be problematic.