Plotting multiple Gaussian processes with plot_gp_dist

Right now this function increments through a color map (looks best with white -> single color set up) as a function of the samples percentiles. Instead I think you’d have to vary alpha to get this to look nice.

Maybe something like this?

percs = np.linspace(51, 99, 40)
alphas = (percs - np.min(percs)) / (np.max(percs) - np.min(percs))
for i, p in enumerate(percs[::-1]):
    upper = np.percentile(samples, p, axis=1)
    lower = np.percentile(samples, 100 - p, axis=1)
    ax.fill_between(x, upper, lower, color="blue", alpha=alphas[i])

Check out the code around line 153 here.

2 Likes