Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > bf21b4394f4d7fa09e3626145d3315e0 > files > 367

python-matplotlib-doc-1.2.0-14.fc18.i686.rpm

.. _pylab_examples-fill_demo2:

pylab_examples example code: fill_demo2.py
==========================================



.. plot:: /builddir/build/BUILD/matplotlib-1.2.0/doc/mpl_examples/pylab_examples/fill_demo2.py

::

    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)
    show()
    

Keywords: python, matplotlib, pylab, example, codex (see :ref:`how-to-search-examples`)