Daily Archives: November 12, 2012

DataViz in Python: Chernoff Faces with Matplotlib

As promised previously, here is my effort towards drawing Chernoff faces as cute as they were in the original paper.

Isn’t that just the cutest? Code here.

My replication was greatly aided by a graphic that I call “the missing figure”, which I found on a website that has since disappeared. It helped me understand what Chernoff’s paper was talking about when it says the corner of the face:

Here are a few other ways to look at it:

Varying one parameter at a time:

Lots and lots of random faces:

Making that figure reminds me of a wonderfully vintage quote from Chernoff’s 1972 paper:

“At this time the cost of drawing these faces is about 20 to 25 cents
per face on the IBM 360-67 at Stanford University using the Calcomp
Plotter. Most of this cost is in the computing, and I believe that it
should be possible to reduce it considerably. ”

I’d pay $250 for a beautiful plot of that last figure. But it is nice that the price has come down.


Filed under dataviz