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

October 5, 2012
By

(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:

Ggtheme_economist

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

Ggtheme_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!)

Ggtheme_excel
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:

Xkcd_cleggpleb1
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 his blog: Revolutions.

R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: 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.