1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
| from scipy import signal import numpy as np
y = np.array([15.4,14.6,15.8,14.8,15.0,15.1,15.1,15.0,15.2,15.4, 14.8,15.0,15.1,14.7,16.0,15.7,15.4,14.5,15.1,15.3, 15.5,15.1,15.6,15.1,15.1,14.9,15.5,15.3,15.3,15.4, 15.7,15.2,15.5,15.5,15.6,15.1,15.1,16.0,16.0,16.8, 16.2,16.2,16.0,15.6,15.9,16.2,16.7,15.8,16.2,15.9, 15.8,15.5,15.9,16.8,15.5,15.8,15.0,14.9,15.3,16.0, 16.1,16.5,15.5,15.6,16.1,15.6,16.0,15.4,15.5,15.2, 15.4,15.6,15.1,15.8,15.5,16.0,15.2,15.8,16.2,16.2, 15.2,15.7,16.0,16.0,15.7,15.9,15.7,16.7,15.3,16.1])
t = slide_t(y,10)
fig = plt.figure(figsize=(15,15)) f_ax1 = fig.add_axes([0.1, 0.1, 0.4, 0.3]) f_ax1.plot(np.arange(1900,1990,1),y,'k')
f_ax2 = fig.add_axes([0.6, 0.1, 0.4, 0.3]) f_ax2.plot(np.arange(1900,1990,1),t,'k') f_ax2.set_xlim(1900,1990) f_ax2.set_ylim(-4,7)
f_ax2.axhline(2.9) f_ax2.axhline(-2.9) plt.show()
|