Skip to content

JohannesBuchner/matplotlib-xkcdify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

XKCDify

Sketchy, imprecise plotting theme for matplotlib.

Sometimes you want to illustrate a point and do not want to emphasize on accuracy but on overall relations. This code originated at jakevdp's blog.

Semi-log and log-log plots

Just take the logarithm before calling the plotting functions, i.e. give matplotlib the base-10 logarithms of the values. Then set the tick labels with the true values:

ax.set_xticks([-3, -2, -1], ['1e-3', '1e-2', '1e-1'])

Sometimes XKCDify also does not appreciate large/negative values. You can solve this by transformations into a space it likes.

References:

About

sketchy, imprecise plotting theme for matplotlib

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages