Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/python/sankey-diagram.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ response = urllib.request.urlopen(url)
data = json.loads(response.read())

# override gray link colors with 'source' colors
opacity = 0.4
opacity = 0.2
# change 'magenta' to its 'rgba' value to add opacity
data['data'][0]['node']['color'] = ['rgba(255,0,255, 0.8)' if color == "magenta" else color for color in data['data'][0]['node']['color']]
data['data'][0]['link']['color'] = [data['data'][0]['node']['color'][src].replace("0.8", str(opacity))
Expand Down Expand Up @@ -199,4 +199,4 @@ fig.show()

### Reference

See [https://plotly.com/python/reference/#sankey](https://plotly.com/python/reference/#sankey) for more information and options!
See [https://plotly.com/python/reference/#sankey](https://plotly.com/python/reference/#sankey) for more information and options!