To get it working, you need
- matplotlib 1.3.1 (it won't work with matplotlib 1.3.0 or earlier)
sudo pip install matplotlib --upgrade
- font Humor Sans
- download from here or here, install (on OS X you open it and click Install)
- remove the matplotlib font cache (as suggested by DanHickstein in matplotlib/issues/2269)
rm ~/.matplotlib/fontList.cache
Now, execute the code and it should work.
You do not need to change backend to TkAgg, as some people suggest. For me it works perfectly fine on 'module://IPython.kernel.zmq.pylab.backend_inline' (you can check it by plt.get_backend()).
(I had the same problem and I've solved it, at least on OS X 10.8.5, with matplotlib 1.3.1 and IPython 2.0.0; removing font cache was necessary to get the font running.)
plt.get_backend(). Try setting it to a *Agg backend, such as Qt4Agg if you have Qt4 installed. You can also use the 'inline' backend with pylab if you're in an ipython notebook. e: see this issue: github.com/matplotlib/matplotlib/issues/2269plt.xkcdcommand takes a number of parameters to tune the amount of manipulation it performs. see it's docstring for more info.