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

Previous topic

pylab_examples example code: quiver_demo.py

Next topic

pylab_examples example code: scatter_demo2.py

This Page

pylab_examples example code: scatter_custom_symbol.pyΒΆ

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

../../_images/scatter_custom_symbol.png
import matplotlib.pyplot as plt
from numpy import arange, pi, cos, sin
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 = list(zip(rx/area*cos(theta), ry/area*sin(theta)))

x,y,s,c = rand(4, 30)
s*= 10**2.

fig, ax = plt.subplots()
ax.scatter(x,y,s,c,marker=None,verts =verts)

plt.show()

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