I have a question about saving plotly table as an image. I wrote the following code:
import plotly.graph_objects as go
layout = go.Layout(autosize=True, margin={'l': 0, 'r': 0, 't': 0, 'b': 0})
fig = go.Figure(data=[go.Table(header=dict(values=['A Scores', 'B Scores']),
cells=dict(values=[[100, 90, 80, 90], [95, 85, 75, 95]]))
], layout=layout)
fig.write_image("fig1.png", scale=5)
But unfortunately, there is a big white space at the bottom of the table.

Can I cut it from the image? The height setting doesn't fit because the table may have a different number of rows.

