I am using Sankey plot, from plotly, and for some reason I keep getting a weird shape on the edges of my graph, as seen on the image:
I expected that the green line should flow directly to from one edge to another, instead of doing this weird loop.
To reproduce the error, you can run the code below:
import plotly.graph_objects as go
fig = go.Figure(go.Sankey(
arrangement = "snap",
node = {
"label": ["A", "B", "C", "D", "E", "F"],
"x": [0, 0.1, 0.5, 0.2, 0.3, 0.5],
"y": [0, 0.5, 0.2, 0.4, 0.2, 0.3],
'pad':10}, # 10 Pixels
link = {
"source": [0, 0, 1, 2, 5, 4, 3, 5],
"target": [5, 3, 4, 3, 0, 2, 2, 3],
"value": [1, 2, 1, 1, 1, 1, 1, 2]}))
fig.show()
you should get this result:
The problem is the edge:
Does anybody know how I can fix it?
Thanks.