According to the Plotly documentation for Sankey diagrams, the node.line property takes a dictionary of color and width, where "width is a number or array of numbers greater than or equal to 0" (emphasize mine).
I assume that supplying an array would set the line width of the individual nodes, but this does not work. Is there a way to set the line width of individual nodes?
To demonstrate:
import plotly.graph_objects as go
fig = go.Figure(data=[go.Sankey(
node = dict(line = dict(color = "black", width = 5),label = ["A","B"]),
link = dict(source = [0], target = [1], value = [1]
))])
fig.show()
gives this result (note the thick lines of the nodes):
When setting width as a list:
import plotly.graph_objects as go
fig = go.Figure(data=[go.Sankey(
node = dict(line = dict(color = "black", width = [5,10]),label = ["A","B"]),
link = dict(source = [0], target = [1], value = [1]
))])
fig.show()
Note that the lines are the default width of 0.5 so the width parameters seem to be fully ignored. (The same effect occurs when trying to set the color parameter. Providing a list for both color and width also does not work.)