You are reading an old version of the documentation (v1.2.1). For the latest version see https://matplotlib.org/stable/
matplotlib

This Page

pylab_examples example code: fill_demo.pyΒΆ

(Source code, png, hires.png, pdf)

../../_images/fill_demo1.png
#!/usr/bin/env python
import numpy as np
import matplotlib.pyplot as plt

t = np.arange(0.0, 1.01, 0.01)
s = np.sin(2*2*np.pi*t)

plt.fill(t, s*np.exp(-5*t), 'r')
plt.grid(True)
plt.show()

Keywords: python, matplotlib, pylab, example, codex (see Search examples)