System details : Ubuntu 14.04, python-2.7.
- Download Humor-Sans ttf font from here.
- Place it in
/usr/share/fonts/truetype/
. For OSx systems, you'd just need to double-click the font file to install. - Run the following commands, to refresh your system's font cache and to delete Maplotlib's font cache.
sudo fc-cache -f -v
cd ~/.cache/matplotlib; rm fontList.cache; cd #for OSx systems, this file resides in ~/.matplotlib/
You can now use Matplotlib's xkcd()
function to plot xkcd-style graphs.