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
评论列表
文章目录