import matplotlib.pyplot as plt x = np.arange(0.0, 2, 0.01) y1 = np.sin(2 * np.pi * x) plt.fill_between(x, y1, 1)