-
Notifications
You must be signed in to change notification settings - Fork 0
/
ElevationPlot.py
53 lines (36 loc) · 1.34 KB
/
ElevationPlot.py
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
import matplotlib.pyplot as plt
from matplotlib import pyplot
import csv
from matplotlib import pylab
import numpy as np
import matplotlib.ticker as plticker
x = []
y = []
fig = plt.figure()
#fig = pylab.gcf()
fig.canvas.set_window_title('Astropi RedsTeam Elevation Plot')
plt.rcParams.update({
"figure.facecolor": (1.0, 1.0, 1.0, 0.5), # red with alpha = 30%
"axes.facecolor": (1.0, 1.0, 1.0, 0.5), # green with alpha = 50%
"savefig.facecolor": (0.0, 0.0, 1.0, 0.2), # blue with alpha = 20%
"figure.figsize": (60,50),
})
# Initialise the subplot function using number of rows and columns
plot1 = plt.subplot2grid((1, 1), (0, 0), colspan=2)
with open('RedsTeamDataLogSamplesNoHaderForMathplot1.csv','r') as csvfile:
lines = csv.reader(csvfile, delimiter=',')
for row in lines:
x.append(row[0])
y.append((float(row[5])))
plot1.plot(x, y, color = 'r', linestyle = 'solid', marker = '',label = "ISS Elevation profile")
loc = plticker.MultipleLocator(base=750) # this locator puts ticks at regular intervals
plot1.xaxis.set_major_locator(loc)
plot1.legend(loc='lower left')
plot1.set_title('Elevation')
plot1.set_ylabel('Altitude (km)')
plot1.grid(True)
#plot1.get_xaxis().set_visible(False)
#plt.ylim(-0.2,0.15)
plt.xlabel("Time")
fig.suptitle('ASTROPI REDSTEAM ISS ELEVATION ANALYSIS', fontsize=30, color='r')
plt.show()