Style your ggplot2 charts with Themes

[This article was first published on Revolutions, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

An update to the ggplot2 “grammar of graphics” package for R is now available on CRAN. This version introduces “Themes” for ggplot2 charts, and makes it possible to define and re-use your own preferences for title fonts and sizes, tick marks, grid color, etc. The system is heirarchically defined, so for example you can choose a font and have it affect just the main title, or every font in the chart.

Element_graph

This new feature should make it easier for ggplot2 users to consistently style charts to their liking. (Although I confess this makes me just a little wistful — it was nice to be able to easily identify a ggplot2 chart in the media from the signature grey background grid.)

This release also includes a few other new features, like support for CDFs (cumulative distribution charts) as native plot elements. You can read all the details in the release notes

To leave a comment for the author, please follow the link and comment on their blog: Revolutions.

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.

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)