Graphics with ggplot2

As we discussed in Chap. 14, “Graphics Overview,” the ggplot2 package is an implementation of Wilkinson’s grammar of graphics (hence the “gg” in its name). The last chapter focused on R’s traditional graphics functions. Many plots were easy, but other plots were a lot of work compared to SAS or SPSS. In particular, adding things like legends and confidence intervals was complicated.