You are reading an old version of the documentation (v1.2.1). For the latest version see https://matplotlib.org/stable/
matplotlib

This Page

pylab_examples example code: scatter_demo.pyΒΆ

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

../../_images/scatter_demo.png
#!/usr/bin/env python
from pylab import *

N = 30
x = 0.9*rand(N)
y = 0.9*rand(N)
area = pi*(10 * rand(N))**2 # 0 to 10 point radiuses
scatter(x,y,s=area, marker='^', c='r')

show()

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