def plot_prediction_curves(subjects, axes, exp):
res_ftemp = "spatial_analysis/{}_{}_ifs.pkz"
for subj, ax in zip(subjects, axes):
res = moss.load_pkl(res_ftemp.format(subj, exp))
x = res.steps
norm = res.null.mean()
real = res.real / norm
pint = res.pint / norm
ax.plot(x, real, "o-", color=".15",
ms=2.5, clip_on=False)
ax.fill_between(x, *pint, color=".4", alpha=.3)
cross_x, cross_y = res.intersect
cross_y /= norm
ax.plot([cross_x, cross_x], [0, cross_y],
lw=.8, dashes=[3, 1], color=".5", zorder=0)
ax.set(xlim=(0, 40), ylim=(0, 2),
xticks=np.linspace(0, 40, 5),
yticks=[0, 1, 2],
yticklabels=[0, 1, 2])
sns.despine(ax=ax)
ylabel = "Normalized error"
plt.setp(axes[1:7], yticklabels=[])
axes[0].set(ylabel=ylabel)
if exp == "dots":
plt.setp(axes[8:], yticklabels=[])
plt.setp(axes[:7], xticklabels=[])
axes[7].set_ylabel(ylabel)
评论列表
文章目录