I have some time series which slowly increases, but over a short period of time they are very wavy. For example, the time series could look like:
[10 + np.random.rand() for i in range(100)] + [12 + np.random.rand() for i in range(100)] + [14 + np.random.rand() for i in range(100)]
I would like to plot the time series with a focus on the general trend, not on the small waves. Is there a way to plot the mean over a period of time surrounded with a stripe indicating the waves (the stripe should represent the confidence interval, where the data point could be in that moment)?
A simple plot would look like this:
The plot which I would like, with confidence intervals would look like this:
Is there an elegant way to do it in Python?