changes to Frontiers_manuscript/For_Submission/Koch_frontiers_revised and addition of Frontiers_manuscript/For_Submission/Koch_frontiers_diff for differences using Latexdiff
This commit is contained in:
@@ -87,12 +87,15 @@ def add_scalebar(ax, matchx=True, matchy=True, hidex=True, hidey=True, **kwargs)
|
||||
def plot_spike_train(ax, model='RS Pyramidal', stop=750):
|
||||
model_spiking = pd.read_csv('./Figures/Data/model_spiking.csv')
|
||||
stop_ind = int(np.argmin(np.abs(model_spiking['t'] - stop)))
|
||||
ax.plot(model_spiking['t'][0:stop_ind], model_spiking[model][0:stop_ind], 'k', linewidth=1.5)
|
||||
if model == 'STN':
|
||||
ax.plot(model_spiking['t'][0:stop_ind], model_spiking[model][0:stop_ind], 'k', linewidth=0.625)
|
||||
else:
|
||||
ax.plot(model_spiking['t'][0:stop_ind], model_spiking[model][0:stop_ind], 'k', linewidth=1.) #1.5
|
||||
ax.set_ylabel('V')
|
||||
ax.set_xlabel('Time [s]')
|
||||
ax.set_ylim(-85, 60)
|
||||
ax.axis('off')
|
||||
ax.set_title(model, fontsize=10)
|
||||
ax.set_title(model, fontsize=7)
|
||||
|
||||
|
||||
def plot_fI(ax, model='RS Pyramidal'):
|
||||
@@ -119,19 +122,35 @@ def plot_fI(ax, model='RS Pyramidal'):
|
||||
ax.plot(firing_values.loc['ramp_down', model],
|
||||
model_F_inf[model][int(np.argmin(np.abs(model_F_inf['I'] - firing_values.loc['ramp_down', model])))],
|
||||
'.', color='r', markersize=3)
|
||||
f = 8
|
||||
f = 6
|
||||
ax.set_ylabel('Frequency [Hz]', fontsize=f)
|
||||
ax.set_xlabel('Current [nA]', fontsize=f)
|
||||
ax.spines['right'].set_visible(False)
|
||||
ax.spines['top'].set_visible(False)
|
||||
ax.tick_params(axis='y', labelrotation=90)
|
||||
|
||||
|
||||
#%%
|
||||
|
||||
# plot layout
|
||||
fig = plt.figure()
|
||||
gs0 = fig.add_gridspec(3, 2, wspace=0.3, hspace=0)
|
||||
gs00 = gs0[:,0].subgridspec(6, 3, wspace=1.5, hspace=1.5)
|
||||
gs01 = gs0[:,1].subgridspec(6, 3, wspace=1.2, hspace=1.3)
|
||||
gs0 = fig.add_gridspec(3, 3, wspace=0.4, hspace=0.2)
|
||||
|
||||
gs00 = gs0[:,0].subgridspec(5, 3, wspace=1.8, hspace=1.5)
|
||||
gs01 = gs0[:,1].subgridspec(5, 3, wspace=1.8, hspace=1.5)
|
||||
gs02 = gs0[:,2].subgridspec(5, 3, wspace=1.8, hspace=1.5)
|
||||
|
||||
ax_diag = fig.add_subplot(gs02[:3, :])
|
||||
import matplotlib.image as mpimg
|
||||
img = mpimg.imread('./Figures/model_diagram2.png')
|
||||
ax_diag.imshow(img)
|
||||
ax_diag.spines['top'].set_visible(False)
|
||||
ax_diag.spines['bottom'].set_visible(False)
|
||||
ax_diag.spines['left'].set_visible(False)
|
||||
ax_diag.spines['right'].set_visible(False)
|
||||
ax_diag.set_yticks([])
|
||||
ax_diag.set_xticks([])
|
||||
ax_diag.text(-0.12, 1.075, string.ascii_uppercase[12], transform=ax_diag.transAxes, size=10, weight='bold')
|
||||
|
||||
ax1_spikes = fig.add_subplot(gs00[0,0:2])
|
||||
ax1_fI = fig.add_subplot(gs00[0, 2])
|
||||
@@ -153,15 +172,15 @@ ax9_spikes = fig.add_subplot(gs00[4,0:2])
|
||||
ax9_fI = fig.add_subplot(gs00[4, 2])
|
||||
ax10_spikes = fig.add_subplot(gs01[4,0:2])
|
||||
ax10_fI = fig.add_subplot(gs01[4, 2])
|
||||
ax11_spikes = fig.add_subplot(gs00[5,0:2])
|
||||
ax11_fI = fig.add_subplot(gs00[5, 2])
|
||||
ax12_spikes = fig.add_subplot(gs01[5,0:2])
|
||||
ax12_fI = fig.add_subplot(gs01[5, 2])
|
||||
ax11_spikes = fig.add_subplot(gs02[3,0:2])
|
||||
ax11_fI = fig.add_subplot(gs02[3, 2])
|
||||
ax12_spikes = fig.add_subplot(gs02[4,0:2])
|
||||
ax12_fI = fig.add_subplot(gs02[4, 2])
|
||||
|
||||
spike_axs = [ax1_spikes, ax2_spikes, ax3_spikes, ax4_spikes, ax5_spikes,ax6_spikes, ax7_spikes, ax8_spikes,
|
||||
ax9_spikes, ax10_spikes, ax11_spikes, ax12_spikes]#, ax13_spikes, ax14_spikes]
|
||||
fI_axs = [ax1_fI, ax2_fI, ax3_fI, ax4_fI, ax5_fI,ax6_fI, ax7_fI, ax8_fI, ax9_fI, ax10_fI,
|
||||
ax11_fI, ax12_fI] #, ax13_fI, ax14_fI]
|
||||
ax11_spikes,ax9_spikes,ax10_spikes, ax12_spikes]#, ax13_spikes, ax14_spikes]
|
||||
fI_axs = [ax1_fI, ax2_fI, ax3_fI, ax4_fI, ax5_fI,ax6_fI, ax7_fI, ax8_fI, ax11_fI, ax9_fI, ax10_fI,
|
||||
ax12_fI] #, ax13_fI, ax14_fI]
|
||||
|
||||
# model order
|
||||
models = ['Cb stellate','RS Inhibitory','FS', 'RS Pyramidal','RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
|
||||
@@ -176,20 +195,91 @@ for i in range(len(models)):
|
||||
plot_fI(fI_axs[i], model=models[i])
|
||||
|
||||
# add scalebars
|
||||
add_scalebar(ax11_spikes, matchx=False, matchy=False, hidex=True, hidey=True, sizex=100, sizey=50, labelx='100\u2009ms',
|
||||
labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.2, -0.05, 1, 1),
|
||||
bbox_transform=ax11_spikes.transAxes)
|
||||
add_scalebar(ax9_spikes, matchx=False, matchy=False, hidex=True, hidey=True, sizex=100, sizey=50, labelx='100\u2009ms',
|
||||
labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.275, -0.05, 1, 1),
|
||||
bbox_transform=ax9_spikes.transAxes)
|
||||
add_scalebar(ax10_spikes, matchx=False, matchy=False, hidex=True, hidey=True, sizex=100, sizey=50, labelx='100\u2009ms',
|
||||
labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.275, -0.05, 1, 1),
|
||||
bbox_transform=ax10_spikes.transAxes)
|
||||
add_scalebar(ax12_spikes, matchx=False, matchy=False, hidex=True, hidey=True, sizex=100, sizey=50, labelx='100\u2009ms',
|
||||
labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.2, -0.05, 1, 1),
|
||||
labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.275, -0.05, 1, 1),
|
||||
bbox_transform=ax12_spikes.transAxes)
|
||||
# add subplot labels
|
||||
for i in range(0,len(models)):
|
||||
# spike_axs[i].text(-0.18, 1.08, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
|
||||
spike_axs[i].text(-0.18, 1.2, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
|
||||
spike_axs[i].text(-0.22, 1.2, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
|
||||
# save
|
||||
fig.set_size_inches(cm2inch(17.6,20))
|
||||
fig.savefig('./Figures/diversity_in_firing.jpg', dpi=fig.dpi) #pdf # eps
|
||||
# fig.savefig('./Figures/diversity_in_firing.png', dpi=fig.dpi) #pdf # eps
|
||||
fig.set_size_inches(cm2inch(21,15))
|
||||
fig.savefig('./Figures/diversity_in_firing_diagram.jpg', dpi=300, bbox_inches='tight') #pdf # eps
|
||||
plt.show()
|
||||
|
||||
|
||||
|
||||
# #%%
|
||||
#
|
||||
# # plot layout
|
||||
# fig = plt.figure()
|
||||
# gs0 = fig.add_gridspec(3, 2, wspace=0.3, hspace=0)
|
||||
# gs00 = gs0[:,0].subgridspec(6, 3, wspace=1.5, hspace=1.5)
|
||||
# gs01 = gs0[:,1].subgridspec(6, 3, wspace=1.2, hspace=1.3)
|
||||
#
|
||||
# ax1_spikes = fig.add_subplot(gs00[0,0:2])
|
||||
# ax1_fI = fig.add_subplot(gs00[0, 2])
|
||||
# ax2_spikes = fig.add_subplot(gs01[0,0:2])
|
||||
# ax2_fI = fig.add_subplot(gs01[0, 2])
|
||||
# ax3_spikes = fig.add_subplot(gs00[1,0:2])
|
||||
# ax3_fI = fig.add_subplot(gs00[1, 2])
|
||||
# ax4_spikes = fig.add_subplot(gs01[1,0:2])
|
||||
# ax4_fI = fig.add_subplot(gs01[1, 2])
|
||||
# ax5_spikes = fig.add_subplot(gs00[2, 0:2])
|
||||
# ax5_fI = fig.add_subplot(gs00[2, 2])
|
||||
# ax6_spikes = fig.add_subplot(gs01[2, 0:2])
|
||||
# ax6_fI = fig.add_subplot(gs01[2, 2])
|
||||
# ax7_spikes = fig.add_subplot(gs00[3,0:2])
|
||||
# ax7_fI = fig.add_subplot(gs00[3, 2])
|
||||
# ax8_spikes = fig.add_subplot(gs01[3,0:2])
|
||||
# ax8_fI = fig.add_subplot(gs01[3, 2])
|
||||
# ax9_spikes = fig.add_subplot(gs00[4,0:2])
|
||||
# ax9_fI = fig.add_subplot(gs00[4, 2])
|
||||
# ax10_spikes = fig.add_subplot(gs01[4,0:2])
|
||||
# ax10_fI = fig.add_subplot(gs01[4, 2])
|
||||
# ax11_spikes = fig.add_subplot(gs00[5,0:2])
|
||||
# ax11_fI = fig.add_subplot(gs00[5, 2])
|
||||
# ax12_spikes = fig.add_subplot(gs01[5,0:2])
|
||||
# ax12_fI = fig.add_subplot(gs01[5, 2])
|
||||
#
|
||||
# spike_axs = [ax1_spikes, ax2_spikes, ax3_spikes, ax4_spikes, ax5_spikes,ax6_spikes, ax7_spikes, ax8_spikes,
|
||||
# ax9_spikes, ax10_spikes, ax11_spikes, ax12_spikes]#, ax13_spikes, ax14_spikes]
|
||||
# fI_axs = [ax1_fI, ax2_fI, ax3_fI, ax4_fI, ax5_fI,ax6_fI, ax7_fI, ax8_fI, ax9_fI, ax10_fI,
|
||||
# ax11_fI, ax12_fI] #, ax13_fI, ax14_fI]
|
||||
#
|
||||
# # model order
|
||||
# models = ['Cb stellate','RS Inhibitory','FS', 'RS Pyramidal','RS Inhibitory +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
|
||||
# 'Cb stellate +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'FS +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
|
||||
# 'RS Pyramidal +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN +$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
|
||||
# 'Cb stellate $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$',
|
||||
# 'STN $\Delta$$\mathrm{K}_{\mathrm{V}}\mathrm{1.1}$', 'STN']
|
||||
#
|
||||
# # plot spike train and fI for each model
|
||||
# for i in range(len(models)):
|
||||
# plot_spike_train(spike_axs[i], model=models[i])
|
||||
# plot_fI(fI_axs[i], model=models[i])
|
||||
#
|
||||
# # add scalebars
|
||||
# add_scalebar(ax11_spikes, matchx=False, matchy=False, hidex=True, hidey=True, sizex=100, sizey=50, labelx='100\u2009ms',
|
||||
# labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.2, -0.05, 1, 1),
|
||||
# bbox_transform=ax11_spikes.transAxes)
|
||||
# add_scalebar(ax12_spikes, matchx=False, matchy=False, hidex=True, hidey=True, sizex=100, sizey=50, labelx='100\u2009ms',
|
||||
# labely='50\u2009mV', loc=3, pad=-0.5, borderpad=-1.0, barwidth=2, bbox_to_anchor=Bbox.from_bounds(-0.2, -0.05, 1, 1),
|
||||
# bbox_transform=ax12_spikes.transAxes)
|
||||
# # add subplot labels
|
||||
# for i in range(0,len(models)):
|
||||
# # spike_axs[i].text(-0.18, 1.08, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
|
||||
# spike_axs[i].text(-0.18, 1.2, string.ascii_uppercase[i], transform=spike_axs[i].transAxes, size=10, weight='bold')
|
||||
# # save
|
||||
# fig.set_size_inches(cm2inch(17.6,20))
|
||||
# fig.savefig('./Figures/diversity_in_firing.jpg', dpi=fig.dpi) #pdf # eps
|
||||
# # fig.savefig('./Figures/diversity_in_firing.png', dpi=fig.dpi) #pdf # eps
|
||||
# plt.show()
|
||||
|
||||
|
||||
|
||||
@@ -364,6 +364,6 @@ ax3_BR.annotate('', (0.7, 75), (0.8, 37.5), arrowprops=dict(arrowstyle="<|-", co
|
||||
|
||||
|
||||
|
||||
fig.set_size_inches(cm2inch(8.5,12))
|
||||
fig.savefig('./Figures/firing_characterization_arrows.jpg', dpi=300, bbox_inches='tight') #, dpi=fig.dpi #pdf #eps
|
||||
fig.set_size_inches(cm2inch(8.3,12))
|
||||
fig.savefig('./Figures/firing_characterization_arrows.pdf', dpi=300, bbox_inches='tight') #, dpi=fig.dpi #pdf #eps
|
||||
plt.show()
|
||||
|
||||
Binary file not shown.
@@ -262,12 +262,17 @@ img = mpimg.imread('./Figures/summary_diagram2.png')
|
||||
inset_ylim = (0, 100)
|
||||
lfsize = 8
|
||||
fig = plt.figure(figsize=cm2inch(17.2, 12))
|
||||
gs = gridspec.GridSpec(15, 3, top=0.95, bottom=0.1, left=0.15, right=0.95, hspace=0.4, wspace=0.2)
|
||||
gs = gridspec.GridSpec(14, 3, top=0.95, bottom=0.1, left=0.15, right=0.95, hspace=0.2, wspace=0.1)
|
||||
|
||||
|
||||
# gs0 = gs[1:13, 2].subgridspec(3, 1, hspace=0.9, wspace=0.25) # width_ratios=[0.3, 0.3,0.3], height_ratios=[0.35],
|
||||
ax1 = fig.add_subplot(gs[1:4,2])
|
||||
ax2 = fig.add_subplot(gs[6:9,2])
|
||||
ax3 = fig.add_subplot(gs[11:14,2])
|
||||
# ax1 = fig.add_subplot(gs[2:5,2])
|
||||
# ax2 = fig.add_subplot(gs[7:10,2])
|
||||
# ax3 = fig.add_subplot(gs[12:15,2])
|
||||
|
||||
|
||||
ax0 = fig.add_subplot(gs[:, :2])
|
||||
# ax1 = fig.add_subplot(gs0[0])
|
||||
@@ -314,7 +319,7 @@ ax3.annotate('', (0.55, 55), (0.3, 90),
|
||||
ax3.text(x=0.05, y=110, s='$\\uparrow$ AUC $\\downarrow$ rheobase', fontsize=lfsize)
|
||||
|
||||
# fig.set_size_inches(cm2inch(17, 12))
|
||||
fig.savefig('./Figures/summary_fig.jpg', dpi=300, bbox_inches='tight') # , dpi=fig.dpi #pdf #eps
|
||||
# fig.savefig('./Figures/summary_fig.jpg', dpi=300, bbox_inches='tight') # , dpi=fig.dpi #pdf #eps
|
||||
#
|
||||
|
||||
plt.show()
|
||||
|
||||
Reference in New Issue
Block a user