Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- altitude (km) pressure (kPa)
- -7.15 1.16
- 0. 0.6
- 25. 0.03
- import numpy as np
- import matplotlib.pyplot as plt
- hscale = 10.8 # km
- kms, kPas = np.array([-7.15, 0.0, 25. ]), np.array([ 1.16, 0.6, 0.03])
- P0, h0 = kPas[0], kms[0]
- alts = np.arange(-38, 25.)
- pressures = P0 * np.exp(-(alts - h0) / hscale)
- if True:
- plt.figure()
- for i in range(2):
- plt.subplot(1, 2, i+1)
- plt.plot(kms, kPas, 'ok')
- plt.plot(alts, pressures)
- if i == 0:
- plt.yscale('log')
- plt.ylabel('pressure (kPa)', fontsize=16)
- else:
- plt.title('linear for @Antzi', fontsize=16)
- plt.xlabel('altitude (km)', fontsize=16)
- plt.show()
Add Comment
Please, Sign In to add comment