xkcd style graphs in various languages

December 29th, 2012 | Categories: just for fun, Latex, math software, mathematica, matlab, programming, python, R | Tags:

xkcd is a popular webcomic that sometimes includes hand drawn graphs in a distinctive style.  Here’s a typical example
xkcd graph

In a recent Mathematica StackExchange question, someone asked how such graphs could be automatically produced in Mathematica and code was quickly whipped up by the community.  Since then, various individuals and communities have developed code to do the same thing in a range of languages.  Here’s the list of examples I’ve found so far

Any I’ve missed?

  1. Andrew Moylan
    December 29th, 2012 at 09:22
    Reply | Quote | #1

    Your “Mathematica-style” link points to R instead of Mathematica.

  2. December 29th, 2012 at 10:07
    Reply | Quote | #2

    Thanks Andrew. Fixed now.

  3. January 2nd, 2013 at 20:01
    Reply | Quote | #3

    I did it in Euler Math Toolbox, at least on a rudimentary level. It is just so much fun. See


  4. January 2nd, 2013 at 20:45
    Reply | Quote | #4

    Looks good Rene, added to the list.

  5. Gregg Fenton
    January 4th, 2013 at 01:17
    Reply | Quote | #5

    I am putting together some fun technical slides and I wanted to use the xkcd code that you highlighted in your “Walking Randomly” blog. I have used this code before under version 8 a few months ago and it ran great. Under version 9 I have noticed an 800% slow down!?

    I used AbsoluteTiming[] to get that slow down value between version 9 and version 8.

    Are you seeing this performance change too? I am also wondering if I am perhaps doing something incorrect???

    Thanks for any help you can offer…

  6. Glandau
    February 2nd, 2014 at 13:56
    Reply | Quote | #6

    As funny as it may seem here is a Fortran based implementation of xkcd-like plots…