Skip to content

Commit 982328a

Browse files
authored
Merge pull request #85 from MobleyLab/editsJIM
Added equilibration figure source code
2 parents d475ba5 + b791ec9 commit 982328a

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

paper/equilibration_fig.py

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
2+
3+
import numpy as np
4+
import matplotlib.pyplot as plt
5+
6+
7+
8+
tvals = np.arange(0.0, 100.0, 0.5)
9+
randdat = np.random.random(len(tvals))*(2.0) - 1.0
10+
tempvals = np.exp(-tvals/2.0) + 1.0 + randdat*0.3
11+
12+
longvals = 1.0 - np.exp(-(tvals/200.0)**0.75) + randdat*0.1
13+
14+
15+
16+
fig, ax = plt.subplots(2, dpi=300)
17+
18+
ax[0].plot(tvals, tempvals)
19+
ax[1].plot(tvals, longvals)
20+
21+
ax[1].set_ylim([0.0, 0.8])
22+
ax[0].set_xlim(0.0, 100.0)
23+
ax[1].set_xlim(0.0, 100.0)
24+
25+
ax[0].set_xticks([])
26+
ax[1].set_xticks([])
27+
ax[0].set_yticks([])
28+
ax[1].set_yticks([])
29+
30+
ax[1].set_xlabel('Simulation Time', fontsize=18)
31+
ax[0].annotate('Quickly-equilibrating', xy=(0.1, 0.8), xycoords='axes fraction',
32+
xytext=(0.1, 0.8), textcoords='axes fraction', ha='left', va='center', fontsize=16)
33+
ax[1].annotate('Slowly-equilibrating', xy=(0.1, 0.8), xycoords='axes fraction',
34+
xytext=(0.1, 0.8), textcoords='axes fraction', ha='left', va='center', fontsize=16)
35+
36+
fig.subplots_adjust(hspace=0)
37+
38+
plt.show()
39+
40+
41+
42+
43+

0 commit comments

Comments
 (0)