I have the following example. I would like to change the position of the info Info3 and Info 2 in the group 2 to have them more on the left.
I tried to change trunklength = 0.6,
without success.
import matplotlib.pyplot as plt
from matplotlib.sankey import Sankey
fig = plt.figure(figsize = (13, 7), frameon = False)
ax = fig.add_subplot(1, 1, 1, xticks = [], yticks = [])
sankey = Sankey(ax = ax,
format = '%.6G',
unit = 'kWh',
scale = 1/1500,
offset = 0.2,# offset du texte par rapport à la flêche
shoulder = 0.0)
#first group
sankey.add(
flows = [ 1000],
orientations = [0],
labels = ['GHI'],
pathlengths = [0.4]
)
#group2
sankey.add(
#patchlabel = 'Essai',
# entre| sortie| infoS
flows = [ 1000,-768,-200,-32,-2,],
orientations = [0,0,-1,1,-1],
labels= [None, None,'INfo 2','INfo 1','INfo 3'],)
#Group 3
sankey.add(
flows = [768, -698, -70],
orientations = [0, 0, -1],
labels = [None, 'ECS consommée','Pertes thermique des ballons'],
prior = 1,
connect = (1, 0)
)
sankey.finish()
plt.show()