Style your R charts like the Economist, Tableau … or XKCD

October 5, 2012

(This article was first published on Revolutions, and kindly contributed to R-bloggers)

As we noted last month, the new Themes feature in ggplot2 helps you customize the design of R charts to your liking. Now, R user Jeffrey Arnold has built on this feature to create standardized themes to make R graphics looks like those from major publications and other software systems. You can use his ggthemes package to make your charts look like those in The Economist:


or as if it was created with data visualization software Tableau:


or if you're an R user on the down-low, with that "classic ugly look and feel" of Microsoft Excel. (A better idea would be to just come out!)

You can download Jeffrey's ggthemes package from github. Not included in the package (yet) is a theme mimicking the hand-drawn style of the charts featured in the XKCD comic series, but StackOverflow is all over it. For example, Mark Bulling shared the ggplot2 theme that created this XKCD-styled chart of Google Trends data:

By the way, if you want to create similar charts reflecting the rate at which specific Google searches are performed, you can use the new rGtrends package from Edmund Hart.

To leave a comment for the author, please follow the link and comment on their blog: Revolutions. offers daily e-mail updates about R news and tutorials on topics such as: Data science, Big Data, R jobs, visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL, Eclipse, git, hadoop, Web Scraping) statistics (regression, PCA, time series, trading) and more...

If you got this far, why not subscribe for updates from the site? Choose your flavor: e-mail, twitter, RSS, or facebook...

Tags: , ,

Comments are closed.

Search R-bloggers


Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)