Hello,
I am producing a table in Python using the plotly package, but I am struggling with adjusting the space around the table. How do I remove unwanted space beneath my plotly table? I tried adjusting the margin sizes in layout which reduces the top, left and right margins. This has reduced the space at the top, left and right by pushing the table to the top of the container, but a lot of space still remains underneath. The purpose of removing the white space underneath is to embed the table in a HTML email with text above and below the table. Any help would be appreciated. Hereβs my code:
table = go.Figure(data=[go.Table(
header=dict(values=[['From cur.'],['To cur.'],['Table rate'],['FX rate'],['Abs. error (%)']],
fill_color='aliceblue',
line_color='darkslategray',
align='left'),
cells=dict(values=[exr_mismatches['From cur.'], exr_mismatches['To cur.'], exr_mismatches['Table rate'].map('{:.3f}'.format),
exr_mismatches['FX rate'].map('{:.3f}'.format), exr_mismatches['Abs. error (%)'].map('{:.2f}'.format)],
fill_color='whitesmoke',
line_color='darkslategray',
align='left'))
])
table.update_layout(autosize=False, margin=dict(l=5, r=5, b=5, t=5), paper_bgcolor='steelblue')