Is there a way to show marker size (bubble size) within the legend of a graph in plotly express (plotly python). For example using the code below, it shows the population using the marker size.
df = px.data.gapminder().query("year==2007")
fig = px.scatter(df, x="gdpPercap", y="lifeExp", color="continent",
size="pop", size_max=45, log_x=True)
fig.show()
Matplotlib has something similar using the .legend_elements("sizes")
(see here, creating a matplotlib scatter legend size related), was wondering if there is something in Plotly as well.