Location: Imtiaz_IP3_2002 @ 81e638b3f094 / Simulation / Figure3 / Plot_Fig3.py

Author:
Leyla <lnor300>
Date:
2022-11-02 15:33:57+13:00
Desc:
..
Permanent Source URI:
https://models.cellml.org/workspace/763/rawfile/81e638b3f094d00aade965d9e2ca7bd101f33371/Simulation/Figure3/Plot_Fig3.py

import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
prefilename = 'Fig3'
filename = '%s.csv' % prefilename 
data = pd.read_csv(filename)

time = data['time']
vm = data['Vm']
ca_y = data['y']
p_ip3 = data['ip3']
ca_z = data[ 'z' ]


fig = plt.figure(figsize=(8, 4),  edgecolor='k')
ax = fig.add_subplot()
fig.subplots_adjust(top=0.85)

ax.set_title('Pulse evoked/abolished slow wave train in the bistable region')
ax.plot(time, vm, 'k')
ax.set_ylabel('Membrane Voltage [mV]', fontsize=12)
ax.set_xlabel('Time [min]', fontsize=12)

ax.text(0.52, 0.9, ' $R$',
        verticalalignment='bottom', horizontalalignment='right',
        transform=ax.transAxes,
        color='k', fontsize=12)

ax.text(0.3, 0.1, '$SS$',
        verticalalignment='bottom', horizontalalignment='right',
        transform=ax.transAxes,
        color='k', fontsize=12)


Extracted_data = 1
if Extracted_data == 1:
        filename = 'Figure3_original.csv'
        data = pd.read_csv(filename)
        y_d = data [ 'Curve1' ]
        x_d = data [ 'x' ]
        ax.plot(-1.5 + x_d, y_d, '.')

plt.show()
plt.savefig('Figure_3')