Building histograms using Rectangles and PolyCollections
Using a path patch to draw rectangles.
The technique of using lots of Rectangle instances, or the faster method of
using PolyCollection, were implemented before we had proper paths with
moveto, lineto, closepoly, etc. in Matplotlib. Now that we have them, we can
draw collections of regularly shaped objects with homogeneous properties more
efficiently with a PathCollection. This example makes a histogram -- it's more
work to set up the vertex arrays at the outset, but it should be much faster
for large numbers of objects.
import matplotlib.pyplot as plt

