File Exchange

image thumbnail

XKCDIFY

version 1.0.0.0 (4.07 KB) by Stuart Layton
Redraw existing plots to look like XKCD style plots

4 Downloads

Updated 04 Oct 2012

View License

Editor's Note: This file was selected as MATLAB Central Pick of the Week

XKCDIFY is tool for converting any plot to a XKCD style plot!

Create plots and style them using the standard Matlab functions and then convert the finished plot to an XKCD style plot!

XKCD iterates over the children of an axes and distorts them based upon their TYPE. If the type is LINE or PATCH it distorts. If the child is of type HGGROUP it then iterates on the sub-children of the hggroup.

% XKCDIFY( AXES ) re-renders all childen of AXES to have a hand drawn
% XKCD style, http://xkcd.com, AXES can be a single axes or a vector of axes

Cite As

Stuart Layton (2020). XKCDIFY (https://www.mathworks.com/matlabcentral/fileexchange/38499-xkcdify), MATLAB Central File Exchange. Retrieved .

Comments and Ratings (7)

Nick LaSorte

Taylor

Good, but needs some work. As Natan noted, the axes need to look less rigid. Similarly, a font change to something like Comic Sans (there's probably a better one) helps a ton.

Holger Hoffmann

Doesnt work as described since it requires more tools than described:

To use 'filtfilt', you might need:
filtfilt - Signal Processing Toolbox

Freeman

Bug report:
xkcdify goes wrong when the original plot is in Log-Scale.

Jason

Does this require the Statistics Toolbox? It seems to require the randsample function.

Natan

Also interesting to see other approaches at the SO page:
http://stackoverflow.com/questions/12701841/xkcd-style-graphs-in-matlab

Natan

Well done! a couple of suggestions for improvement:

1. make the axes to also look hand drawn by overwriting them with your "cartoonify_line"...

2. Add the Humor-Sans font, that is available from http://xkcdsucks.blogspot.com/2009/03/xkcdsucks-is-proud-to-present-humor.html

MATLAB Release Compatibility
Created with R2011b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!