5.1 Get the data

We can save a ggplot() object into a variable (we usually call it p but can be any name). This then appears in the Environment tab. To plot it it needs to be recalled on a separate line to get drawn (Figure 5.1). Saving a plot into a variable allows us to modify it later (e.g., p + theme_bw()).

p0: Starting plot for the examples in this chapter.

FIGURE 5.1: p0: Starting plot for the examples in this chapter.