Style your R charts like the Economist, Tableau … or XKCD
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.
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.
R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.