Location: Sneyd_2016 @ da1f78260d85 / Simulations / Fig1_Plot.py

Author:
Leyla <noroozbabaee@gmail.com>
Date:
2021-11-11 23:09:06+13:00
Desc:
All the files are updated!
Permanent Source URI:
https://staging.physiomeproject.org/workspace/7b3/rawfile/da1f78260d851b46a4490c0cde5b78233b64a835/Simulations/Fig1_Plot.py

import pandas as pd
import matplotlib.pyplot as plt


prefilename = 'Fig1_A'
filename = '%s.csv' % prefilename
data = pd.read_csv(filename)
time1 = data [ 'time' ]
ca_c1 = data [ 'ca_c' ]
p_1 = data [ 'p' ]

prefilename1 = 'Fig1_B'
filename1 = '%s.csv' % prefilename1
data0 = pd.read_csv(filename1)
time2 = data0 [ 'time' ]
ca_c2 = data0 [ 'ca_c' ]
p_2 = data [ 'p' ]

prefilename = 'Fig1_C'
filename = '%s.csv' % prefilename
data = pd.read_csv(filename)
time3 = data [ 'time' ]
ca_c3 = data [ 'ca_c' ]
p_3 = data [ 'p' ]

fig, axs = plt.subplots(3)
labelfontsize = 12
axs [ 0 ].plot(time1, ca_c1, 'k', time1, p_1, '-.b')
axs [ 1 ].plot(time2, ca_c2, 'k', time2, p_2, '-.b')
axs [ 2 ].plot(time3, ca_c3, 'k', label='Ca')
axs [ 2 ].plot( time3, p_3, '-.b', label='IP3')
axs [ 1 ].set_ylabel('[C$a_{c}] (\mu m)$', fontsize = labelfontsize)
axs [ 2 ].set_xlabel('Time (s)', fontsize=labelfontsize)
axs [ 0 ].axis([ 0,150, 0, 0.8 ])
axs [ 1 ].axis([ 0,150, 0, 0.8 ])
axs [ 2 ].axis([ 0,450, 0, 0.8 ])
axs [ 2 ].legend(loc='best', fontsize=labelfontsize, frameon=False)
plt.show()

plt.savefig('Figure_1')