sup_figure_6.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:Waskom_PNAS_2017 作者: WagnerLabPapers 项目源码 文件源码
def plot_kdes(subjects, axes):

    ftemp = "correlation_analysis/{}_{}_ifs.pkz"
    for subj, ax in zip(subjects, axes):

        sticks = moss.load_pkl(ftemp.format(subj, "sticks")).corrmat
        rest = moss.load_pkl(ftemp.format(subj, "rest")).corrmat

        triu = np.triu_indices_from(rest, 1)

        sns.kdeplot(sticks[triu], color=".15",
                    label="residual", ax=ax)
        sns.kdeplot(rest[triu], color=".45", dashes=[4, 1],
                    label="resting", ax=ax)

    plt.setp(axes,
             xlim=(-.25, .8), ylim=(0, 17),
             xticks=np.linspace(-.2, .8, 6),
             yticks=[])

    for ax in axes:
        sns.despine(ax=ax, left=True, trim=True)
        plt.setp(ax.get_xticklabels(), size=6)
        plt.setp(ax.get_yticklabels(), size=6)

    axes[0].legend(bbox_to_anchor=(1.2, .8))
    for ax in axes[1:]:
        ax.legend_ = None
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号