Controlling legend circle size in bubble plot

Hi. I’ve been making some (offline) bubble plots using the Python API. I am using bubbles of different sizes. Everything works well, but I cannot see how to control the size of the circles that plotly puts into the legend. The size looks to be determined by the numbers in the size (list) argument I give to the markers. I.e., the size list seems to be controlling two things: the sizes of the individual bubbles in the body of the plot, and also the size of the single bubble in the legend. As I increase the values in the size list, the size of the legend bubble increases proportionally.

In this example, there are different plot bubble sizes, but the legend bubbles are all the same size. OTOH, on this page the first chart has differently sized bubbles in the legend in the first plot, but identical sized ones in the legends of the latter plots.

I have plotly version 2.0.1

Can someone tell me how to control this?


This is super frustrating - it appears that plotly uses a heuristic to decide whether to scale the legend marker sizes and there is not an option to turn it off.

Here’s the same issue in the R library -