-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplot_f107.py
More file actions
33 lines (29 loc) · 724 Bytes
/
plot_f107.py
File metadata and controls
33 lines (29 loc) · 724 Bytes
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
28
29
30
31
32
33
# F10.7 plotter
import pdb
from pyglow import pyglow
import datetime as dt
import pickle
import matplotlib.pyplot as plt
import matplotlib
time = dt.datetime(2014, 8, 1)
endtime = dt.datetime(2017, 7, 1)
times = []
f107 = []
while time <= endtime:
pt = pyglow.Point(time, 100, 0, 0)
f107.append(pt.f107a)
times.append(time)
time += dt.timedelta(days=1)
plt.plot_date(times, f107, '-')
plt.grid()
plt.ylabel('81-day averaged F10.7')
plt.ylim([0, 180])
pdb.set_trace()
from matplotlib.dates import DateFormatter
ax = plt.gca()
ax.xaxis.set_major_formatter( DateFormatter('%Y/%m/%d') )
font = {'family' : 'normal',
'weight' : 'bold',
'size' : 15}
matplotlib.rc('font', **font)
plt.show()