ggplot2 Version of Figures in “Lattice: Multivariate Data Visualization with R” (Part 1)

October 16, 2014
By

(This article was first published on R Language – the data science blog, and kindly contributed to R-bloggers)

Learning R

The data visualization package lattice is part of the base R distribution, and like ggplot2 is built on Grid graphics engine. Deepayan Sarkar’s (the developer of lattice) book Lattice: Multivariate Data Visualization with R gives a detailed overview of how the package works. All the figures and code used to produce them is also available on the book website.

In order to give those interested an option to compare graphs produced by ggplot2 and lattice, I will attempt to recreate the book’s lattice graphs in ggplot2. There are 14 chapters in the book, so this means that there would be at least 13 more posts on the subject.

The output of both packages can be tweaked so that the graphs would look similar if not the same, however for the purposes of comparison, the standard settings (at least in ggplot2) are used when possible. The code used to create…

View original post 182 more words

To leave a comment for the author, please follow the link and comment on their blog: R Language – the data science blog.

R-bloggers.com 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...

Comments are closed.

Sponsors

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)