ax.set_yticks([]) ax.set_title('Karlsson & Frank, Nat. Neurosci. (2009)', pad=8) sb.despine(ax=ax, left=True, bottom=True) ax.set_aspect('auto') ax = axes[2][1] ax.imshow(plt.imread(os.path.join(figdir, fname_Suh2013))) ax.set_xticklabels([]) ax.set_yticklabels([]) ax.set_xticks([]) ax.set_yticks([]) ax.set_title('Suh et al., Neuron (2013)', pad=10) sb.despine(ax=ax, left=True, bottom=True) x = -0.25 y = 1.2 label_panel(ax=axes[0][0], label='A', x=x, y=y + 0.1) label_panel(ax=axes[0][1], label='B', x=x - 0.12, y=y + 0.1) label_panel(ax=axes[1][0], label='C', x=x, y=y) label_panel(ax=axes[1][1], label='D', x=x + 0.1, y=y) label_panel(ax=axes[2][0], label='E', x=x, y=y + .07) label_panel(ax=axes[2][1], label='F', x=x + 0.1, y=y + .1) fig.subplots_adjust(left=.01, bottom=.1, right=.99, top=.9, wspace=0.5, hspace=0.6) fig.set_size_inches(width, height) fname_base = 'FIGURE_8'
PROPd.etO[0, :] = prop_density_da # hack PROPd.plot_prop_kernels(first_state=0, cmap=cmap_prop, autoprop_off=False, n=1, vmin=0, vmax=vmax_prop) for start in states_away: EXPdh.plot_trajectory(state_seq=[start], plot_env=False, state_func_env=True) ax15.set_title('diffusive propagator [away]') x = -0.2 y = 1.2 label_panel(ax0, 'A', x, y) label_panel(ax1, 'B', x, y) label_panel(ax2, 'C', x, y) label_panel(ax3, 'D', x, y) label_panel(ax4, 'E', x, y) label_panel(ax5, 'F', x, y) label_panel(ax6, 'G', x, y) label_panel(ax7, 'H', x, y) label_panel(ax8, 'I', x, y) label_panel(ax9, 'J', x, y) label_panel(ax10, 'K', x, y) label_panel(ax11, 'L', x, y) label_panel(ax12, 'M', x, y)
labelbottom=False, labeltop=False, labelleft=False, labelright=False) sb.despine(ax=ax2, top=True, right=True, left=True, bottom=True) sb.despine(ax=ax3, top=True, right=True, left=True, bottom=True) sb.despine(ax=ax4, top=True, right=True, left=True, bottom=True) sb.despine(ax=ax5, top=True, right=True, left=True, bottom=True) ax2.set_title('true SR') ax3.set_title('learned SR (superdiffusion)') ax4.set_title('learned SR (diffusion)') ax5.set_title('learned SR (min-autocorr)') x = -0.25 y = 1.3 label_panel(ax0, label='A', x=x + 0.25, y=y) label_panel(ax1, label='B', x=x, y=y) label_panel(ax2, label='C', x=x, y=y) label_panel(ax3, label='D', x=x + 0.14, y=y) label_panel(ax4, label='E', x=x - 0.14, y=y) label_panel(ax5, label='F', x=x - 0.09, y=y) fig.subplots_adjust(left=.01, bottom=.1, right=.99, top=.9, wspace=0.6, hspace=0.8) fig.set_size_inches(width, height) if save_output:
ax11.set_title('Pfeiffer & Foster, Science (2015)', pad=9) ax11.text(x=90, y=460, s='empirical data', color='black', fontsize=10) ax11.text(x=35, y=500, s='even-step prediction', color='red', fontsize=10) ax11.add_patch( patches.Rectangle((5, 420), width=400, height=100, fill=False, ec='black', clip_on=False)) # tweak panels sb.despine(fig, top=True, right=True) x = -0.3 y = 1.2 label_panel(ax0, 'A', x, 1.2) label_panel(ax1, 'B', x, 1.2 + 0.2) label_panel(ax2, 'C', x, 1.2) label_panel(ax3, 'D', x, 1.2) label_panel(ax4, 'E', x - 0.1, 1.3) label_panel(ax5, 'F', x - 0.1, 1.3) label_panel(ax6, 'G', x - 0.1, 1.3) label_panel(ax7, 'H', x - 0.1, 1.3) label_panel(ax8, 'I', x - .05, 1.3) label_panel(ax9, 'J', x, 1.3) label_panel(ax10, 'K', x, 1.3) label_panel(ax11, 'L', x, 1.3) fig.subplots_adjust(left=.01, bottom=.1, right=.99,
across_samp=True) EXP_sdiff_base.set_target_axis(ax=ax4) EXP_sdiff_base.plot_coverage(color=color_superdiff, func_of_time=False, across_samp=True) ax4.set_ylabel('fraction of env. visited', labelpad=5) ax4.set_title('exploration efficiency (single)', pad=10) ax4.set_xlabel('avg. distance traversed') ax4.set_xlim([0, 300]) ax4.set_ylim([0, 0.12]) ax4.text(x=20, y=0.1, s='diffusion', color=color_diff) ax4.text(x=20, y=0.09, s='superdiffusion', color=color_superdiff) x = -0.35 y = 1.2 label_panel(ax0, 'A', x, y) label_panel(ax1, 'B', x, y) label_panel(ax2, 'C', x, y) label_panel(ax3, 'D', x, y) label_panel(ax4, 'E', x, y) label_panel(ax5, 'F', x, y) fig.subplots_adjust(left=.01, bottom=.1, right=.99, top=.9, wspace=0.7, hspace=0.6) fig.set_size_inches(width, height) if save_output: save_figure(fig=fig, figdir=figdir, fname_base=fname_base, file_ext='.png')
pos_initial[1], 'S', ha="center", va="center", color="k") # dominant eigenvector ax2 = axes[0][2] GEN.set_target_axis(ax2) GEN.plot_real_eigenvectors(start=1, n=1) ax2.set_title('dominant spectral \n component (DSC)', pad=1) # LABELS, FINESSE AND SAVE x = -0.25 y = 1.3 label_panel(axes[0][0], 'A', x=x + 0.1, y=y) label_panel(axes[0][1], 'B', x=x - 0.1, y=y) label_panel(axes[0][2], 'C', x=x, y=y) label_panel(axes[0][3], 'D', x=x, y=y) label_panel(axes[1][0], 'E', x=x + 0.1, y=y - 0.1) label_panel(axes[1][1], 'F', x=x - 0.1, y=y - 0.1) label_panel(axes[1][2], 'G', x=x, y=y - 0.1) label_panel(axes[1][3], 'H', x=x, y=y - 0.1) fig.subplots_adjust(left=.01, bottom=.1, right=.99, top=.9, wspace=0.6, hspace=0.6) fig.set_size_inches(width, height)
sb.lineplot(data=df_spec_rel[(df_spec.alpha==alpha_base)&(df_spec.tau==tau_shift)], x=x_index, y='gain', hue='alpha', size='tau', sizes=sizes, palette=cmap_spec, ax=ax5, legend=legend, marker='o', markersize=sizes[tau_shift]*2, markeredgewidth=0., markerfacecolor=color_diff, markeredgecolor=color_diff, clip_on=False, zorder=100) sb.lineplot(data=df_spec_rel[(df_spec.alpha==alpha_shift)&(df_spec.tau==tau_shift)], x=x_index, y='gain', hue='alpha', size='tau', sizes=sizes, palette=cmap_spec, ax=ax5, legend=legend, marker='o', markersize=sizes[tau_shift]*2, markeredgewidth=0., markerfacecolor=color_superdiff, markeredgecolor=color_superdiff, clip_on=False, zorder=100) sb.lineplot(data=df_spec_rel[(df_spec.alpha==alpha_shift)&(df_spec.tau==tau_base)], x=x_index, y='gain', hue='alpha', size='tau', sizes=sizes, palette=cmap_spec, ax=ax5, legend=legend, marker='o', markersize=sizes[tau_base]*2, markeredgewidth=0., markerfacecolor=color_superdiff, markeredgecolor=color_superdiff, clip_on=False, zorder=100) ax5.set_ylim([0,0.3]) if x_index == 'eval': ax5.set_xlabel('eigenvalue $ \lambda$') ax5.set_xlim([-4,0]) else: ax5.set_xlabel('spatial wavelength') ax5.set_ylabel(r'$s_{\alpha,\tau}(\lambda) / s_{1,1}(\lambda)$ [normalized]') ax5.set_title('relative power spectrum') sb.despine(fig, top=True, right=True) # label_panels(axes) x = -0.3 y = 1.2 label_panel(axes[0][0], 'A', x, y) label_panel(axes[0][1], 'B', x, y) label_panel(axes[0][2], 'C', x, y) label_panel(axes[1][0], 'D', x, y) label_panel(axes[1][1], 'E', x, y) label_panel(axes[1][2], 'F', x, y) fig.subplots_adjust(left=.01, bottom=.1, right=.99, top=.9, wspace=0.6, hspace=0.6) fig.set_size_inches(width, height) if save_output: save_figure(fig=fig, figdir=figdir, fname_base=fname_base, file_ext='.png') save_figure(fig=fig, figdir=figdir, fname_base=fname_base, file_ext='.pdf')
# SPECTRAL EMBEDDING ax4 = axes[2][0] ax5 = axes[2][1] ax6 = axes[2][2] ax7 = axes[2][3] LRNd.mds_dyn_mat(ax=ax4, type="SR", learned=False) LRNd.mds_dyn_mat(ax=ax6, type="SR") LRNs.mds_dyn_mat(ax=ax5, type="SR") LRNo.mds_dyn_mat(ax=ax7, type="SR") x = -0.25 y = 1.3 label_panel(axes[0][0], label="A", x=x + 0.25, y=y) label_panel(axes[0][1], label="B", x=x, y=y) label_panel(axes[0][2], label="C", x=x, y=y) label_panel(axes[0][3], label="D", x=x, y=y) label_panel(axes[1][0], label="E", x=x + 0.05, y=y) label_panel(axes[1][1], label="F", x=x - 0.38, y=y) label_panel(axes[1][2], label="G", x=x - 0.39, y=y) label_panel(axes[1][3], label="H", x=x - 0.4, y=y) label_panel(axes[2][0], label="I", x=x + 0.23, y=y) label_panel(axes[2][1], label="J", x=x, y=y) label_panel(axes[2][2], label="K", x=x, y=y) label_panel(axes[2][3], label="L", x=x, y=y) fig.subplots_adjust(left=0.01, bottom=0.1, right=0.99, top=0.9, wspace=0.6, hspace=0.8)