Style your ggplot2 charts with Themes

September 5, 2012
By

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

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 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.