E.g., set Cain
to red
and Azura
to blue
, but otherwise, let things be automatic. Children of Cain
should also get faded versions of red
.
labels = ["Eve", "Cain", "Seth", "Enos", "Noam", "Abel", "Awan", "Enoch", "Azura"]
parents = ["", "Eve", "Eve", "Seth", "Seth", "Eve", "Eve", "Awan", "Eve"]
fig = go.Figure(go.Treemap(
labels = labels,
parents = parents,
values = [10, 14, 12, 10, 2, 6, 6, 1, 4] )
I tried adding a color_discrete_map={'Cain':'red', 'Azura':'blue'}
, but go.Treemap
did not accept this argument.