-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDimple.py
32 lines (32 loc) · 1.04 KB
/
Dimple.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
#!/usr/bin/python
#
import matplotlib.pyplot as plt
import numpy as np
import matplotlib as mpl
#
mpl.rcParams.update({'font.size': 16})
#
arrowShrinkSize = 0.1
figureFontSize = 16
arrowWidth = 1
N_A = 6.02e23
#
time, NOnoDimple, NOyesDimple = np.loadtxt('Dimple_comparison.txt',unpack = True)
time_min, time_max = time.min(), time.max()
#
ax = plt.subplot(111)
noDimple = plt.plot(time,NOnoDimple, 'k-', label = 'w/o depression')
Dimple = plt.plot(time,NOyesDimple, 'k--', label = 'w/ depression')
plt.xlabel('Time (s)', fontsize = figureFontSize)
plt.ylabel('moles NO in aqueous phase (moles)', fontsize = figureFontSize)
plt.legend(loc=4, fontsize = figureFontSize)
#ax.xaxis.label.set_fontsize(figureFontSize)
#ax.yaxis.label.set_fontsize(figureFontSize)
xlabel = ax.xaxis.set_tick_params(labelsize = figureFontSize)
ylabel = ax.yaxis.set_tick_params(labelsize = figureFontSize)
ax.ticklabel_format(style='sci')
#xlabel.set_fontsize(figureFontSize)
#ax.get_yticklabels().set_fontsize(figureFontSize)
#
plt.savefig('NO_dimple_plot.eps',format='eps')
plt.show()