-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotmax.py
More file actions
executable file
·63 lines (44 loc) · 1.47 KB
/
Copy pathplotmax.py
File metadata and controls
executable file
·63 lines (44 loc) · 1.47 KB
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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#!/usr/bin/env python
import pickle as pkl
import sys
import matplotlib.pyplot as plt
[zenDist, maxAltVel, maxAzVel, maxAltAcc, maxAzAcc] = pkl.load( open( "plotdata.pkl", "rb" ) )
zenDist = []
maxAltVel = []
maxAltAcc = []
maxAzVel = []
maxAzAcc = []
def main():
for i in range (1,len(sys.argv)):
upkl(sys.argv[i])
exit()
plot()
def upkl(filename):
[a, b, c, d, e] = pkl.load( open( filename, "rb" ) )
zenDist.append(a)
maxAltVel.append(b)
maxAzVel.append(c)
maxAltAcc.append(d)
maxAzAcc.append(e)
return
def plot():
fig, [[ax1,ax2],[ax3,ax4]] = plt.subplots(nrows=2, ncols=2)
ax1.plot(zenDist, maxAltVel, 'b-')
ax1.set_xlabel('Zenith Distance at transit')
ax1.set_ylabel('Angular Velocity [deg / s]', color='b')
ax1.tick_params('y', colors='b')
ax2.plot(zenDist, maxAzVel, 'r-')
ax2.set_xlabel('Zenith Distance at transit')
ax2.set_ylabel('Angular Velocity [deg / s]', color='b')
ax2.tick_params('y', colors='b')
ax3.plot(zenDist, maxAltAcc, 'g-')
ax3.set_xlabel('Zenith Distance at transit')
ax3.set_ylabel('Max Angular Acceleration [deg / s^2]', color='b')
ax3.tick_params('y', colors='b')
ax4.plot(zenDist, maxAzAcc, 'k-')
ax4.set_xlabel('Zenith Distance at transit')
ax4.set_ylabel('Max Angular Acceleration [deg / s^2]', color='b')
ax4.tick_params('y', colors='b')
fig.tight_layout()
plt.show()
main()