0

This is the code for my sankey plot I got:

fig = go.Figure(data = [go.Sankey(
    node = dict(
        pad = 15,
        thickness = 20, 
        line = dict (color = 'black', width = 0.5),
        label = unique_source_target_ses,
    ), 
    
    link = dict(
        source = links_dict_ses['source'],
        target = links_dict_ses['target'],
        value = links_dict_ses['value'],
    )
)]

)

I defined the links_dict_ses with source, target and value. Now I wanted to add color to the links and nodes, so they would match in order to follow the flow of the sankey plot better.

How do I add color to the links so they match the color in node?

0 Answers0