I would like to create sankey diagram showing two seprated flows? Flow named L
and P
. Like one image below (It's only example image for tests).
How to do it with matplotlib sankey? My test code below
sankey = Sankey()
sankey.add(flows=[200, -50, -100, -50],
orientations=[0, 1, 0, -1],
labels=['L', 'L1', 'L2', 'L3'],
trunklength=200,
)
sankey.add(flows=[200, -50, -100, -50],
orientations=[0, 1, 0, -1],
labels=['P', 'P1', 'P2', 'P3'],
trunklength=200,
rotation=180,
)
sankey.finish()
plt.savefig('tests/TestPloting/Sankey.png')