-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathploting.py
39 lines (30 loc) · 820 Bytes
/
ploting.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
import matplotlib.pyplot as plt
import numpy as np
data = np.load('simulation_data.npz')
z = data['z']
ThetaPlot = data['ThetaPlot']
TPlot = data['TPlot']
TaPlot = data['TaPlot']
for j in range(len(TPlot)):
if j%600 == 0:
plt.clf()
plt.subplot(1,2,1)
scatter = plt.scatter(TPlot[j],z,s=8,label='with water flow')
scatter = plt.scatter(TaPlot[j],z,s=8,label='constant water content')
ax = scatter.axes
ax.invert_yaxis()
plt.ylabel('Distance (in cm)')
plt.xlabel('Temperature (in C)')
plt.legend(loc=4)
plt.subplot(1,2,2)
scatter = plt.scatter(ThetaPlot[j],z,s=8)
ax = scatter.axes
ax.invert_yaxis()
plt.xlim(0.1,0.5)
#plt.ylabel('Distance (in cm)')
plt.xlabel('Water content')
plt.suptitle('Time '+ str(round(j/3600,0)) + ' hours')
plt.pause(0.1)
else:
continue
plt.show()