import limix_plot as lp
from numpy import sort
from numpy.random import RandomState
# >>>
random = RandomState(1)
# >>>
n0 = 30
x0 = sort(random.rand(n0))
y0 = 10 * x0 + random.rand(n0)
# >>>
n1 = 20
x1 = sort(random.rand(n1))
y1 = 10 * x1 + random.rand(n1)
# >>>
cc = lp.ConsensusCurve()
cc.add(x0, y0)
cc.add(x1, y1)
# >>>
(x, ybottom, y, ytop) = cc.consensus()
ax = lp.get_pyplot().gca()
_ = ax.plot(x, y)
_ = ax.fill_between(x, ybottom, ytop, lw=0, edgecolor='None',
                    facecolor='blue',  alpha=0.25, interpolate=True)
lp.show()
