Bring Drag & Drop to Dash with Dashboard Engine. 💫 Learn how at our next webinar!

Adjust legend spacing

How can I reduce the space in between the legend traces:

legend

I tried all parameters specified here: https://plotly.com/python/reference/layout/#layout-showlegend

No luck. Same applies for horizontal layout.

Hi there,
Try adjusting the tracegroupgap

fig.update_layout(legend_tracegroupgap=5)

Default value is 10