I am just wondering how to deal with the nodes with no incoming and outgoing flows in Sankey diagram with plotly in Python. To be specific, letβs say there are some nodes and links for all nodes but there is no link for βA3β but exists in node set as follows:
import plotly.graph_objects as go
fig = go.Figure(data=[go.Sankey(
node = dict(
pad = 15,
thickness = 20,
line = dict(color = "black", width = 0.5),
label = ["A1", "A2", "B1", "B2", "C1", "C2", "A3"],
color = "blue"
),
link = dict(
source = [0, 1, 0, 2, 3, 3],
target = [2, 3, 3, 4, 4, 5],
value = [8, 4, 2, 8, 4, 2]
))])
fig.show()
In this case, how can I show βA3β in sankey diagram with specific width and height for its node? Thank you in advance!