In JupyterLab, when putting go.FigureWidget
objects into tabs of ipywidgets.Tab
, the figure in the first tab automatically spans the whole tab area, but figures in other tabs donโt, even if the same figure.
This happens only in JupyterLab and not in JupyterNotebook (where no figure automatically resizes).
Code to reproduce:
import ipywidgets as widgets
import plotly.graph_objects as go
fig = go.FigureWidget(data=go.Bar(y=[2, 3, 1]))
tab = widgets.Tab([fig, fig, fig])
tab
Iโm not sure if that comes from JupyterLab or from plotly though.