コード例 #1
0
ファイル: fig6.py プロジェクト: elenakreutzer/Cosyne
def plot_var_result_example(ax):
    ax.set_xlim([-0.0,5.5])
    data_hr_ht = core.get_data('fig6/variance_hr_ht.npy')
    data_lr_ht = core.get_data('fig6/variance_lr_ht.npy')
    data_hr_lt = core.get_data('fig6/variance_hr_lt.npy')
    time_params=core.get_data('fig6/time_parameters.npy').item()


    weighttrace=np.concatenate(((data_hr_ht,),(data_lr_ht,),(data_hr_lt,)))
    
    core.show_axis(ax)
    core.make_spines(ax)
    ax.set_prop_cycle(cycler('color',[core.label_to_color["hr_ht"],core.label_to_color["lr_ht"],core.label_to_color["hr_lt"]] ))

    plotf.trace_plot(ax,weighttrace,time_params,linewidth=core.linewidth["normal"])
    ax.axvline(x=5,color=core.label_to_color["aux_lines"],linewidth=core.linewidth["aux_lines"],ls="dashed")
    ax.text(5.,75.,r"$t_0$")
    ax.set_xlabel(core.x_labels["trace_plot"])
    ax.set_ylabel(core.y_labels["trace_plot"])
    ax.legend((r"$w_1$",r"$w_2$",r"$w_3$"),loc=2,fontsize=8.,handlelength=0.5,frameon=False)
    




    pass
コード例 #2
0
ファイル: fig6.py プロジェクト: elenakreutzer/Cosyne
def plot_attenuation_example_abs(ax):
    data_prox = core.get_data('fig6/attenuation_proximal_synapse.npy')
    data_dist = core.get_data('fig6/attenuation_distal_synapse.npy')
    time_params=core.get_data('fig6/time_parameters.npy').item()
    ax.set_prop_cycle(cycler('color',[core.label_to_color["attenuation_ldist"],core.label_to_color["attenuation_hdist"]] ))
    weighttrace=np.concatenate(((data_prox,),(data_dist,)))
    
    core.show_axis(ax)
    core.make_spines(ax)

    plotf.trace_plot(ax,weighttrace,time_params,perc=False,linewidth=core.linewidth["normal"])
    ax.set_xlabel(core.x_labels["trace_plot"])
    ax.set_ylabel(core.y_labels["trace_plot_dend_abs"])
   # ax.legend((r"$d=3\mu m$",r"$d=7\mu m$"),loc=2,fontsize=8.,handlelength=0.5,frameon=False)

    
    pass
コード例 #3
0
def plot_phase3(ax):

    data_hom = core.get_data('fig5/w_hom_phase3.npy')
    data_het = core.get_data('fig5/w_het_phase3.npy')
    time_params = core.get_data('fig5/time_parameters.npy').item()
    ax.set_xlim([-.5, 5.5])
    x_ticks = np.array((0., 2.5, 5.))
    ax.xaxis.set_ticks(x_ticks)

    weighttrace = np.concatenate(((data_hom, ), (data_het, )))
    ax.set_prop_cycle(
        cycler('color',
               [core.label_to_color["stim"], core.label_to_color["unstim"]]))

    core.show_axis(ax)
    core.make_spines(ax)

    plotf.trace_plot(ax,
                     weighttrace,
                     time_params,
                     linewidth=core.linewidth["normal"])
    ax.axvline(x=0,
               color=core.label_to_color["aux_lines"],
               linewidth=core.linewidth["aux_lines"],
               ls="dashed")
    ax.text(0., 99.05, r"$t_0$")
    ax.axvline(x=5,
               color=core.label_to_color["aux_lines"],
               linewidth=core.linewidth["aux_lines"],
               ls="dashed")
    ax.text(5., 99.05, r"$t_1$")

    ax.set_xlabel(core.x_labels["trace_plot"])
    ax.set_ylabel(core.y_labels["trace_plot"])
    ax.legend((r"$w_{\rm st}$", r"$w_{\rm ust}$"),
              loc=0,
              fontsize=8.,
              labelspacing=0.1,
              borderaxespad=0.1,
              borderpad=0.,
              handlelength=0.5,
              frameon=False)

    pass
コード例 #4
0
def plot_phase1(ax):
    data_hom = core.get_data('fig5/w_hom_phase1.npy')
    data_het = core.get_data('fig5/w_het_phase1.npy')
    time_params = core.get_data('fig5/time_parameters.npy').item()

    ax.set_xlim([-.5, 5.5])
    x_ticks = np.array((0., 2.5, 5.))
    ax.xaxis.set_ticks(x_ticks)

    weighttrace = np.concatenate(((data_hom, ), (data_het, )))

    ax.set_prop_cycle(
        cycler('color',
               [core.label_to_color["stim"], core.label_to_color["unstim"]]))

    core.show_axis(ax)
    core.make_spines(ax)

    plotf.trace_plot(ax,
                     weighttrace,
                     time_params,
                     linewidth=core.linewidth["normal"])
    ax.axvline(x=0,
               color=core.label_to_color["aux_lines"],
               linewidth=core.linewidth["aux_lines"],
               ls="dashed")
    ax.text(0., 10., r"$t_0$")

    ax.axvline(x=5,
               color=core.label_to_color["aux_lines"],
               linewidth=core.linewidth["aux_lines"],
               ls="dashed")
    ax.text(5., 10., r"$t_1$")

    ax.set_xlabel(core.x_labels["trace_plot"])
    ax.set_ylabel(core.y_labels["trace_plot"])

    pass