Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > a44f8c7e78ee9c5838c1fb080c9e7630 > files > 1405

python-matplotlib-doc-1.1.1-1mdv2010.1.noarch.rpm

.. _pylab_examples-scatter_custom_symbol:

pylab_examples example code: scatter_custom_symbol.py
=====================================================



.. plot:: /home/mandrake/rpm/BUILD/matplotlib-1.1.1/doc/mpl_examples/pylab_examples/scatter_custom_symbol.py

::

    from matplotlib.pyplot import figure, show
    from numpy import arange, pi, cos, sin, pi
    from numpy.random import rand
    
    # unit area ellipse
    rx, ry = 3., 1.
    area = rx * ry * pi
    theta = arange(0, 2*pi+0.01, 0.1)
    verts = zip(rx/area*cos(theta), ry/area*sin(theta))
    
    x,y,s,c = rand(4, 30)
    s*= 10**2.
    
    fig = figure()
    ax = fig.add_subplot(111)
    ax.scatter(x,y,s,c,marker=None,verts =verts)
    
    show()
    

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