In [6]:
import pandas as pd
import numpy as np
import matplotlib.pyplot as plt
In [ ]:
 
In [ ]:
 
In [8]:
y = np.random.randint(100, size=20)
In [9]:
y
Out[9]:
array([ 0, 39, 21, 79, 66, 16, 39, 98, 49, 86, 23, 84, 18, 17, 89, 17, 57,
       59, 59, 62])
In [32]:
p2i = lambda x: x/96
In [45]:
fig = plt.figure()
fig.set_size_inches(p2i(160),p2i(40))
maxval = 100
layers = 4
color = "#f5222d"
for i in range(layers):
    plt.fill_between(range(len(y)), y-(maxval/layers)*i, alpha=0.3+i/10, color=color)
plt.axis('off')
plt.xlim(0,len(y)-1)
plt.ylim(min(y),maxval/layers)
Out[45]:
(0, 25.0)
In [ ]:
 
In [ ]:
 
In [ ]:
 
In [ ]: