Sophie

Sophie

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

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

.. _pylab_examples-scatter_symbol:

pylab_examples example code: scatter_symbol.py
==============================================



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

::

    from matplotlib import pyplot as plt
    import numpy as np
    import matplotlib
    
    x = np.arange(0.0, 50.0, 2.0)
    y = x ** 1.3 + np.random.rand(*x.shape) * 30.0
    s = np.random.rand(*x.shape) * 800 + 500
    
    plt.scatter(x, y, s, c="g", alpha=0.5, marker=r'$\clubsuit$',
                label="Luck")
    plt.xlabel("Leprechauns")
    plt.ylabel("Gold")
    plt.legend(loc=2)
    plt.show()
    

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