How to shade under curve in matplotlib, but with variable color alpha?
问题 I have some data points which are a function of one variable. I'd like to plot these, but there's associated uncertainty in each datum. Error bars would be OK, but I'd like to be able to visualize the way we expect the error to be distributed as well. For instance, a gaussian distribution with known width could be given. I'm hoping that the alpha value of fill_between could be set according to the probability distribution, resulting in a plot like in this question about filling under a curve,