-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathplot_profiles.py
More file actions
31 lines (25 loc) · 884 Bytes
/
Copy pathplot_profiles.py
File metadata and controls
31 lines (25 loc) · 884 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
def plot_profiles(prof,p,t,s,cyy,cmm,cdd):
import config
import numpy as np
import matplotlib.pyplot as plt
fig = plt.figure(1,facecolor='white',edgecolor='black')
fig.set_figwidth=180
fig.set_figheight=6
ax = fig.add_subplot(1, 2, 1)
ax.scatter(t,-p,edgecolor='r',color='r')
ax.set_title(prof)
plt.grid()
plt.ylim([-np.ceil(np.max(p)),0 ])
plt.xlabel('Temperature ('+config.deg+'C)')
plt.ylabel('Pressure (dbar)')
ax = fig.add_subplot(1, 2, 2)
ax.scatter(s,-p,edgecolor='b',color='b')
ax.set_title(prof)
plt.grid()
plt.ylim([-np.ceil(np.max(p)),0 ])
plt.xlabel('Salinity')
plt.ylabel('Pressure (dbar)')
fig.set_size_inches(18.5, 10.5)
plt.savefig(config.pdir+'%02d' %cyy+'%02d' %cmm+'%02d' %cdd+'/'+prof+'_' +'%02d' %cmm+'%02d' %cdd+'%02d' %cyy+'.png',dpi=300)
plt.close()
return;