ABSTRACT

The most elegant and versatile plotting package in R is ggplot2. gg stands for grammar of graphics which allows you to make a plot by describing it one component at a time. The chapter starts with step-by-step instructions covering the basic components of a ggplot. It then goes on to introduce different types of plots, including scatter and bubble plots, line and time series plots, barplots and histograms, and boxplots. The chapter also includes sections on how to combine different plots together, as well as on how to know where to find and how to construct types not covered here.