Guest User

Untitled

a guest
Oct 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.74 KB | None | 0 0
  1. altitude (km) pressure (kPa)
  2. -7.15 1.16
  3. 0. 0.6
  4. 25. 0.03
  5.  
  6. import numpy as np
  7. import matplotlib.pyplot as plt
  8.  
  9. hscale = 10.8 # km
  10. kms, kPas = np.array([-7.15, 0.0, 25. ]), np.array([ 1.16, 0.6, 0.03])
  11. P0, h0 = kPas[0], kms[0]
  12. alts = np.arange(-38, 25.)
  13. pressures = P0 * np.exp(-(alts - h0) / hscale)
  14.  
  15. if True:
  16. plt.figure()
  17. for i in range(2):
  18. plt.subplot(1, 2, i+1)
  19. plt.plot(kms, kPas, 'ok')
  20. plt.plot(alts, pressures)
  21. if i == 0:
  22. plt.yscale('log')
  23. plt.ylabel('pressure (kPa)', fontsize=16)
  24. else:
  25. plt.title('linear for @Antzi', fontsize=16)
  26. plt.xlabel('altitude (km)', fontsize=16)
  27. plt.show()
Add Comment
Please, Sign In to add comment