You are reading an old version of the documentation (v1.2.1). For the latest version see

This Page

pylab_examples example code: fill_demo.pyΒΆ

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

#!/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')

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