Experimenting with the sankey rankine example, the following code is a start to create a grid of sankey diagrams similar to the image in the question.
The left subplot uses default colors (which eases fiddling with the lengths) while the right image shows everything in orange.
import matplotlib.pyplot as plt
from matplotlib.sankey import Sankey
sns.set_style('whitegrid')
fig, axes = plt.subplots(ncols=2, figsize=(11, 4))
for ax in axes:
ax.set_xticks([k for k in range(-3, 7, 2)])
ax.set_yticks([k for k in range(-2, 7, 2)])
ax.grid(True)
sankey = Sankey(ax=ax, unit=None, scale=1)
if ax == axes[0]:
facecolor = None
edgecolor = None
else:
facecolor = 'orange'
edgecolor = 'orange'
sankey.add(flows=[1, -.6, -.4], label='4,4', trunklength=1.5, pathlengths=[1, .5, .5],
orientations=[0, 1, -1], rotation=90, fc=facecolor, ec=edgecolor)
sankey.add(flows=[.6, -.6], label='4,3', trunklength=.4, pathlengths=[.5, .65],
orientations=[0, -1], prior=0, connect=(1, 0), fc=facecolor, ec=edgecolor)
sankey.add(flows=[.6, -.1, -.5], label='3,3', trunklength=.65, pathlengths=[.5, .75, .9],
orientations=[0, 1, 0], prior=1, connect=(1, 0), fc=facecolor, ec=edgecolor)
sankey.add(flows=[.4, -.4], label='3,5', trunklength=.55, pathlengths=[.5, .85],
orientations=[0, 1], prior=0, connect=(2, 0), fc=facecolor, ec=edgecolor)
sankey.add(flows=[.4, -.2, -.2], label='2,5', trunklength=.65, pathlengths=[.5, 1.75, 1.8],
orientations=[0, 1, -1], prior=3, connect=(1, 0), fc=facecolor, ec=edgecolor)
diagrams = sankey.finish()
plt.tight_layout()
plt.show()
