XKCD-style graphs

Apr 15, 2014 at 8:23 AM
Hello,

How hard would it be to implement 'xkcd style' linestyles? I see no current 'style' setting I could enhance with such a styling.

for people that don't know what I mean: http://xkcdgraphs.com

Image
Image

These plots are very useful to show estimate data instead of hard, absolute data.

I'm curious for your insights :-)

Tnx,

Tobias
Coordinator
Apr 15, 2014 at 8:35 AM
Hi Tobias, I really like this idea :-) It would be great for an example. And could be considered to include in the OxyPlot core. We need to create a custom "HandDrawnLinearAxis" and "HandDrawnLineSeries" using some "hand-draw" interpolation function.

See
http://jakevdp.github.io/blog/2012/10/07/xkcd-style-plots-in-matplotlib/
http://xkcdgraphs.com/xkcd.js
Coordinator
Apr 16, 2014 at 5:56 AM
I think there is a better way... I made the Render method of the PlotModel virtual. Now you can make an XKCD IRenderContext decorator and use this in the overridden render method. This means all content of the plot model can be XKCD style! :-) If someone can write the rand_func (see link) in c#, I can make the decorator! :) http://nbviewer.ipython.org/gist/anonymous/3835181
Apr 16, 2014 at 7:07 AM
Sounds good! I'll see if I can help tonight.
Coordinator
Apr 16, 2014 at 9:26 PM
The decorator is checked in. I just added some random jitter that doesn't look good. Please help on a xkcd filter function similar to the one used in mathematica/matplotlib!
Tip: install the Humor-Sans.ttf font (easily found by google).