Matplotlib cumulative plot
<p>What matplotlib function I should use for creating such "above" plots?</p>

<p>I've tried to find it in <a href="http://matplotlib.org/gallery.html" rel="nofollow">gallery</a>, but I've not managed to do it.</p>

<p><a href="http://i.stack.imgur.com/fUThW.png" rel="nofollow"><img src="http://i.stack.imgur.com/fUThW.png" alt="enter image description here"></a></p>

<p>You could use <code>matplotlib</code> <code>fill_between</code>, for example,</p>

<pre><code>#!/usr/bin/env python
import matplotlib.pyplot as plt
import numpy as np

x = np.arange(0.0, 2, 0.1)
y = 10*np.ones(x.shape[0])
c = ['r', 'b', 'g', 'y', 'k']
fig, ax = plt.subplots()
for i in range(5):
    r = np.random.randn(x.shape[0])
    yp = np.copy(y)
    y = y + np.cumsum(np.abs(r))
    ax.fill_between(x, yp, y, color=c[i], alpha=0.5)

plt.show()
</code></pre>

<p>Would look like,
<a href="http://i.stack.imgur.com/jG9Ch.png" rel="nofollow"><img src="http://i.stack.imgur.com/jG9Ch.png" alt="enter image description here"></a></p>

python matplotlib