For people like me who would like to make PDF-reports with this kind of graph-style without resorting to Mathematica, take a look at this TeX-solution[1]. It utilizes the random step-decoration in Tikz to achieve a similar result.
By "by hand". I assume you mean using some sort of Intuos tablet with various pen and brush tips and some sort of curve-smoothing software so you can trace over the output of GNUplot, yes?
Unless he's changed his ways, I thought xkcd was still drawn by pencil and paper, then outlined with pen, scanned in, then touched up via a paint program?
This question reminds me of the work Microsoft Research developed to automatically create 'hand drawn' maps for Bing. The process relies on four steps: data selection, data simplication, layout and decoration. The tool seems to be offline now, but when I tried it, it worked well for simple direction sets, but like the charts problem, it sometimes needed human curation to ensure that the selection and simplification steps were meaningful.
Hang on people... The whole 'Randall Rocks/cool factor' aside, let us not forget the purpose of information visualisation.
I don't see much discussion about the ability of these charts to condense large amounts of data into compact spaces. No mention of these devices ability to encode a concept into a visual experience... Not to put too fine a point to it but... What Would Edward Tufte Say?
A "hand-drawn" plot compared to pixel-perfect one communicates an important message that error-bars are unknown and a model the plot is based on might be wrong. It stresses the plot is qualitative: a general shape of curves might be right and numbers might have correct order of magnitude — nothing more.
I think it is very simple. Hand drawn charts are easier and more pleasant to read^, because they are familiar. Everyone had drawn and seen a large number of such charts at school. Comfort food really.
^Not necessarily correlates with information retention.
Where I could really enjoy this is in the context of textbooks and tutorials. Sometimes a hand-drawn figure is able to convey an abstract idea much more clearly. When I see figures representing manifolds (e.g. the many figures in Roger Penrose's Road To Reality), it's easier for my mind to understand them as abstract notions rather than 2-d geometric entities on the page.
The problem is that good hand-drawn figures are hard - xkcd just makes it look easy.
I agree. I had once started off to make such an application. A virtual pen-and-paper, whiteboard-and-marker. Also, instead of using mouse pointer, one could draw on the touchpad. There is a subtle difference, but one that could make drawing less awkward.
Spent a bit of time working on a d3js version. It's super ugly because I just hacked it together while learning how d3js works; I'm sure someone will come along and do it much better ;)
Such lib is not hard to write. Somewhat limiting but simple version could just be a Canvas API wrapper that breaks down lines and curves into smaller lines then jiggle the points randomly before rendering the points out using Catmull-Rom to Bezier spline conversion.
Complicated part is in intelligent fragmentation and jiggling based on hand velocity and hand muscle modeling but it's pretty easy to get decent result. Another technique to combine this with is drawing each path more than once but, like bold fonts, result is not as generally useful.
Working as an animator, we found that a pretty good way to mimic wobbly lines like this was to use a 2d fractal as displacement map. Does anyone know of any algorithms for 2d displacement? Would be quite fun to port it javascript
Would it be possible to do something like this in Wolfram Alpha? I'm not sure how complicated you can make the input there, but it's using the same Mathematica engine, so I imagine it's possible somehow...
I'm not used to Mathematica and before I spend some time deciphering this: Are they distorting the whole image, or picking parts of it? It kinda looks like the former, which exaggerates some parts a bit, compared to xkcd.
The first solution (Chris) first defines a function that takes a pure function and makes it wiggle, then goes on to draw the graphic elements of the plot (axes, legend, the curve). This way everything is still a fully symbolic graphic object and can be exported as pdf.
The second solution (Simon wood) uses rasterzation and image processing to do the trick, thus losing vector data.
I like this idea, but the results have what I would say is "very low momentum" in them (not speaking with any kind of terminology here, just ad hoc) meaning that just as when you write L E T T E R S e..x..t..r..e...m...e...l...y... s--l---o---w---l---y you get much more wiggle in them, the two images on this page are very very wavy, as though the pen that drew them had no momentum.
isn't there a way to have lines be drawn by a hand that has inertia/momentum and is trying to follow the logical curve, but just wavers a certain percentage and correct as it goes along? This is what gets (in my opinion) the result we see. Someone drawing at a good pace by hand and correcting while he does so. not a "random deviation" around the logical path, whch is what these results seem to be more like.
only a few, as i explain in one of them. some of my other comments if they are extremely technical and analytical might instead contain a rational tag :)
[1]: http://tex.stackexchange.com/questions/74878/create-xkcd-sty...