Jupyter Notebook 简单示例:
import numpy as np
from matplotlib import pyplot as plt
ys = 200 + np.random.randn(100)
x = [x for x in range(len(ys))]
plt.plot(x,ys,'_')
plt.fill_between(x,ys,195,where=(ys>195),facecolor = 'g',alpha = 0.6)
plt.title('Fills and alpha example')
plt.show()
效果图: