I want to know how it is possible to draw a figure like the one below in python using matplotlib.
What one of the curves, let's say the yellow one, show is that for a set of list say l1 to l10 where each one has length of 25k, it calculates the mean and draws it as a solid yellow line and also draws mean +/- standard deviation as transparant, shaded areas around the mean.
How can we plot such a thing using matplotlib? I used the links the comments for the example in code below.
from matplotlib import pyplot as pl
import numpy as np
l = []
for _ in xrange(20):
l.append(np.random.uniform(0, 1, 100))
mean = np.mean(l, axis=0)
standard_dev = np.std(l, axis=0)
pl.plot(mean)
pl.fill_between(mean, mean-standard_dev, mean+standard_dev)
pl.show()
But what I get is: