def plot_cluster_error(ax):
res_ftemp = "spatial_analysis/{}_{}_ifs.pkz"
for exp in ["dots", "sticks"]:
subjects = get_subject_order(exp)
color = get_colormap(exp, as_cmap=False)[20]
errs = []
for subj in subjects:
res = moss.load_pkl(res_ftemp.format(subj, exp))
x = res.steps
norm = res.null.mean()
errs.append(res.real / norm)
errs = np.vstack(errs)
mean = errs.mean(axis=0)
ax.plot(x, mean, color=color, lw=2)
sem = stats.sem(errs, axis=0)
ax.fill_between(x, mean - sem, mean + sem, alpha=.2, color=color)
ax.axhline(y=1, lw=1, dashes=[5, 2],
color=".5", zorder=0,
xmin=.02, xmax=.98)
ax.set(xlim=(0, 42),
ylim=(.55, 1.45),
yticks=[.6, .8, 1, 1.2, 1.4],
xticks=[0, 10, 20, 30, 40],
xlabel="Neighborhood radius (mm)",
ylabel="Normalized error")
sns.despine(ax=ax, trim=True)
评论列表
文章目录