Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Change legend marker size for Plotly scatter plot (bubble chart) in Python

Tags:

python

plotly

As I started modifying the Categorical Bubble Charts example found here, the size of the markers in the legend became so small they could not be seen.

Is there a way to control the legend marker size without changing the marker size in the plot?

like image 295
Sean Bearden Avatar asked Oct 19 '25 03:10

Sean Bearden


1 Answers

The comment by anbjork found here gave me a great workaround:

fig.update_layout(legend= {'itemsizing': 'constant'})
like image 128
Sean Bearden Avatar answered Oct 20 '25 18:10

Sean Bearden