Learn R Programming

xkcd (version 0.0.3)

theme_xkcd: Creates a XKCD theme

Description

This function creates a XKCD theme for ggplot graphics.

Usage

theme_xkcd()

Arguments

Value

  • A theme with white background and fonts of the XKCD family.

Details

It uses the XKCD fonts. You must install this type of fonts. See Note.

References

fibosworld 2013. Change fonts in ggplot2, and create xkcd style graphs http://fibosworld.wordpress.com/2013/02/17/change-fonts-in-ggplot2-and-create-xkcd-style-graphs/

Various Authors 2012. How can we make xkcd style graphs in R? http://stackoverflow.com/questions/12675147/how-can-we-make-xkcd-style-graphs-in-r

http://simonsoftware.se/other/xkcd.ttf

Examples

Run this code
p <- ggplot() + geom_point(aes(mpg, wt), data=mtcars) + theme_xkcd()
p

Run the code above in your browser using DataLab