# Author: Leyla Noroozbabaee # Date: 15/11/2021 # To reproduce Figure 6, execute 'Fig6_10_sim.py' & 'Fig6D_10D_sim.py' in the Python console in OpenCOR_. # This can be done with the following commands at the prompt in the OpenCOR_ Python console: # In [1]: cd path/to/folder_this_file_is_in # In [2]: run Fig6_10_sim.py import matplotlib.pyplot as plt import pandas as pd # Figure name figfile = 'Fig6' # Set figure dimension (width, height) in inches. fw, fh = 15, 6 # Set subplots subpRow, subpCol = 2, 2 ax, lns = {}, {} # Set Title tit = [' p=0.02 | p=0.05 | p=0.09 | p=0.25'] # This gives list with the colors from the cycle, which you can use to iterate over. cycle = plt.rcParams['axes.prop_cycle'].by_key()['color'] # Set subplots lfontsize, labelfontsize = 10, 14 # legend, label fontsize fig, axs = plt.subplots(subpRow, subpCol, figsize=(fw, fh), facecolor='w', edgecolor='k') fig.subplots_adjust(hspace = .2, wspace=.1) data = pd.read_csv('ORAI_HEK.csv') x_time = data ["time"] HEK_ca_c = data ["ca_c"] data = pd.read_csv('ORAI12_DKO.csv') ORAI12_ca_c = data ["ca_c"] axs[0,0].plot(x_time, HEK_ca_c, color='k', label='ORAI_HEK') axs[0,0].plot(x_time, ORAI12_ca_c, color=cycle [ 8 % 7 ], label='ORAI12_DKO') plt.tick_params(direction='in', axis='both') axs [0,0].legend(loc='best', fontsize=lfontsize, frameon=False) axs [0,0].set_ylabel('$ Ca_{c} (\mu M)$', fontsize=labelfontsize) axs [0,0].set_title('%s' % (tit[0])) axs [0,0].legend(loc='best', fontsize=lfontsize, frameon=False) axs [0, 0].axis([ 0,200, 0, 0.8 ]) data = pd.read_csv('ORAI1_SKO.csv') x_time = data ["time"] ORAI1_ca_c = data ["ca_c"] data = pd.read_csv('ORAI2_SKO.csv') ORAI2_ca_c = data ["ca_c"] axs[0, 1].plot(x_time, ORAI1_ca_c, color='r', label='ORAI1_SKO') axs[0, 1].plot(x_time, ORAI2_ca_c, color='b', label='ORAI2_SKO') axs[0, 1].set_title('%s' % (tit[0])) axs[0, 1].legend(loc='best', fontsize=lfontsize, frameon=False) axs[0, 1].axis([0, 200, 0, 0.8]) data = pd.read_csv('ORAI23_DKO.csv') x_time = data ["time"] ORAI23_ca_c = data ["ca_c"] data = pd.read_csv('ORAI_TKO.csv') ORAITKO_ca_c = data ["ca_c"] axs[1, 0].plot(x_time, ORAI23_ca_c, color='g', label='ORAI23_DKO') axs[1, 0].plot(x_time, ORAITKO_ca_c, color='gray', label='ORAI23_TKO') axs[1, 0].legend(loc='best', fontsize=lfontsize, frameon=False) axs[1, 0].set_ylabel('$Ca_{c}(\muM)$', fontsize=labelfontsize) axs[1, 0].axis([0, 200, 0, 0.8 ]) axs[1, 0].set_xlabel('Time (s)', fontsize=labelfontsize) f_name = ['ORAI_HEK','ORAI2_SKO', 'ORAI12_DKO','ORAI23_DKO'] clr = ['k', 'b', 'r','g'] for i in range(4): file_name = '%s_D.csv' % f_name[i] data = pd.read_csv(file_name) ca_c = data [ "ca_c" ] x_time = data [ "time" ] axs [ 1, 1 ].plot(x_time, ca_c, color='%s' % clr[i] , label='%s ' % f_name[i]) axs [ 1, 1 ].legend(loc='center left', fontsize=lfontsize, frameon=False) axs [1, 1 ].axis([ 0,250, 0, 1 ]) axs [1,1].set_xlabel('Time (s)', fontsize=labelfontsize) figfiles = '%s_6.png' % figfile plt.savefig(figfiles) plt.show()