Guest User

Untitled

a guest
Oct 23rd, 2018
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. # n wird im voraus gesetzt, abhängig von der input-datei
  2. # n bezeichnet, wv plots am ende nebeneinander existieren sollen
  3.  
  4. f, axarr = plt.subplots(2,n)
  5.  
  6. for i, outputNum in enumerate(range(1,n+1)):
  7. # mache rechnung
  8. # ...
  9.  
  10. axarr[0,i].plot(x[i],y[i])
  11. axarr[1,i].plot(x_norm[i],y_norm[i])
  12. plt.show()
  13.  
  14. # dieser code funktioniert nicht für n=1, da die notation dann
  15. # axarr[0], axarr[1], ... wäre. wie kann ich das verbessern?
Add Comment
Please, Sign In to add comment