You may want to try the “update_layout”, it has an autosize option.
fig.update_layout(
autosize=True,
width=400,
height=400)
More detail can be found at Layout with Python
You may want to try the “update_layout”, it has an autosize option.
fig.update_layout(
autosize=True,
width=400,
height=400)
More detail can be found at Layout with Python