import os import sys # Get the directory containing the current file current_dir = os.path.dirname(os.path.abspath(__file__)) sys.path.append(os.path.join(current_dir, '../dataPlot/')) from dataPlot import plot_line2D, subplots_ajdust path_=os.path.join(current_dir, '../Electrogenic cotransporter/CellMLV2/sim_results/') data_path=os.path.join(current_dir, '../Electrogenic cotransporter/data/') save_fig = {'save_fig': True, 'fig_format': 'tif', 'file_path': path_, 'filename': 'SGLT1_fit_fig5_kinetic'} filename = data_path+'Fig5_Parent1992_exp.csv' filename_BG= path_+'fig5_BG.csv' filename_ss= path_+'fig5_ss.csv' filename_kinetic= path_+'fig5_kinetic.csv' subtitle_kwargs={} fig_cfg = {'num_rows': 1, 'num_cols': 1, 'width':6.75, 'height':4, 'fig_title': None, 'title_y': 0.98, 'fontsize': 8, 'left': 0.1, 'bottom': 0.15, 'right': 0.95, 'top': 0.9, 'wspace': 0.28, 'hspace': 0.2}|save_fig #fig, axs= subplots_ajdust(fig_cfg, **subtitle_kwargs) plot_cfg = {} line_cfg = {} line_cfg[1] = { 'xdata': (filename,'x'), 'ydata':(filename,'Curve1'), 'color': 'k', 'marker': '.', 'linestyle': '', 'label': 'Parent et al. (1992)'} line_cfg[2] = { 'xdata': (filename_BG,'V_E'), 'ydata':(filename_BG,'Ii'), 'color': 'r', 'linestyle': '-.', 'label': 'Bond graph'} line_cfg[3] = { 'xdata': (filename_ss,'V0_Vm'), 'ydata':(filename_ss,'Ii'), 'color': 'm', 'linestyle': '-.', 'label': 'Steady state (37) from bond graph'} line_cfg[4] = { 'xdata': (filename_kinetic,'V_E'), 'ydata':(filename_kinetic,'Ii'), 'color': 'g', 'linestyle': '-.', 'label': 'Kinetic model'} plot_cfg[1] = {'ylabel': 'i (nA)', 'xlabel': 'V (mV)','show_grid': 'both', 'grid_axis': 'both', 'line': [1,2,4], 'legend': [1,2,4]} plot_line2D(fig_cfg, plot_cfg, line_cfg)