Graphics with ggplot2 (GPL)graphics

  • Robert A Muenchen
Part of the Statistics and Computing book series (SCO)

As we discussed in Chap. 20, the ggplot2 package ggplot2 package is an implementation of Wilkinson's Grammar of Graphics. SPSS implements these concepts in its Graphics Production Language (GPL). Chapter 21 focused on R's traditional graphics functions. Many plots were easy, but other plots seemed to be quite a bit of work compared to SAS or SPSS. In particular, adding things like legends and confidence intervals were rather complicated. The ggplot2 package makes those things easier as you will now see as we replicate many of the same graphs. Since ggplot2 has a shorter qplotqplot function (also called quickplot) and a more powerful ggplotggplot function, we will use both so you can learn the difference. The built-in lattice package is also capable of doing these examples well.

While traditional graphics come with R, you will need to install the ggplot2 package. For details, see Chap. 5. Once installed, we need to load the package using the library function.> library("ggplot2")Loading...


Data Frame Position Argument Group Graphic Workshop Attendance Ggplot2 Package 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Copyright information

© Springer Science+Business Media, LLC 2009

Authors and Affiliations

  • Robert A Muenchen
    • 1
  1. 1.University of TennessceKnoxvilleUSA

Personalised recommendations