Location: Imtiaz_IP3_2002 @ 4624ea7e4bf5 / Simulation / Figure3 / Fig3_plot.py

Author:
Leyla <lnor300>
Date:
2022-11-02 15:31:28+13:00
Desc:
..
Permanent Source URI:
https://models.fieldml.org/workspace/763/rawfile/4624ea7e4bf53d57d1f03fbbc2791d8e953ace0b/Simulation/Figure3/Fig3_plot.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')