-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathiono_vis.py
52 lines (41 loc) · 1.19 KB
/
iono_vis.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
import pandas as pd
import matplotlib.pyplot as plt
def plot_ionopause_data(data):
"""
This function plots the ionopause data.
Args:
data: The ionopause data.
"""
# Plot the line chart.
plt.plot(data["time"], data["height"])
plt.xlabel("Time (seconds)")
plt.ylabel("Height (km)")
# Plot the bar chart.
plt.bar(data["species"], data["density"])
plt.xlabel("Species")
plt.ylabel("Density (cm^-3)")
# Plot the box plot.
plt.boxplot(data["density"])
plt.xlabel("Species")
plt.ylabel("Density (cm^-3)")
# Plot the scatter plot.
plt.scatter(data["time"], data["height"])
plt.xlabel("Time (seconds)")
plt.ylabel("Height (km)")
# Plot the heatmap.
plt.imshow(data["density"].astype("float").corr())
plt.xlabel("Species")
plt.ylabel("Species")
# Plot the three-dimensional plot.
fig = plt.figure()
ax = fig.add_subplot(111, projection="3d")
ax.plot(data["time"], data["height"], data["density"])
ax.set_xlabel("Time (seconds)")
ax.set_ylabel("Height (km)")
ax.set_zlabel("Density (cm^-3)")
plt.show()
if __name__ == "__main__":
# Read the data from the file.
data = pd.read_csv("ionopause_data.csv")
# Plot the data.
plot_ionopause_data(data)