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

This Page

pylab_examples example code: fill_demo2.pyΒΆ

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

from matplotlib.pyplot import figure, show
from numpy import arange, sin, pi

fig = figure()
ax = fig.add_subplot(111)
t = arange(0.0,3.01,0.01)
s = sin(2*pi*t)
c = sin(4*pi*t)
ax.fill(t, s, 'b', t, c, 'g', alpha=0.2)

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