Looking at the example here:
The figure has a legend. I canât see where thatâs coming from? Is it something in addition to the example code?
import plotly.express as px
import numpy as np
df = px.data.gapminder().query(âyear == 2007â)
df[âworldâ] = âworldâ # in order to have a single root node
fig = px.treemap(df, path=[âworldâ, âcontinentâ, âcountryâ], values=âpopâ,
color=âlifeExpâ, hover_data=[âiso_alphaâ],
color_continuous_scale=âRdBuâ,
color_continuous_midpoint=np.average(df[âlifeExpâ], weights=df[âpopâ]))
fig.show()