Advertisement
Guest User

Untitled

a guest
Oct 31st, 2014
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.98 KB | None | 0 0
  1. import numpy as np
  2. import matplotlib.pyplot as plt
  3. from matplotlib.sankey import Sankey
  4.  
  5. fig = plt.figure()
  6. ax = fig.add_subplot(1, 1, 1, xticks=[], yticks=[],
  7. title="Vereinfachtes Kraftwerksmodell")
  8. sankey = Sankey(ax=ax, unit=None)
  9. sankey.add(flows=[1.0, -0.3, -0.1, -0.1, -0.5],
  10. labels=['P$el$', 'Q$ab,vd$', 'P$vl,vd$', 'P$vl,mot$', ''],
  11. label='Laden',
  12. orientations=[0, -1, 1, 1, 0])
  13. sankey.add(flows=[0.5, 0.1, 0.1, -0.1, -0.1, -0.1, -0.1, -0.3], fc='#37c959',
  14. label='Entladen',
  15. labels=['P$mech$', 'Q$zu,ex$', 'Q$zu,rekup$', 'P$vl,tb$', 'P$vl,gen$', 'Q$ab,tb$', 'Q$ab,rekup$', 'P$nutz$'],
  16. orientations=[0, -1, -1, 1, 1, -1, -1, 0], prior=0, connect=(4, 0))
  17. sankey.add(flows=[-0.1, 0.1],
  18. label='Rekuperator',
  19. #labels=['bla'],
  20. orientations=[1,1], prior=1, connect=(2, 0))
  21. diagrams = sankey.finish()
  22. diagrams[-1].patch.set_hatch('/')
  23. plt.legend(loc='lower right')
  24. plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement