4. How ggplot Thinks

Content for Wednesday, January 25, 2023


We start getting into the business of writing R code to make the graphs we want, focusing on ideas about how graphs represent data. In particular we examine the idea of a mapping between some column of data in our table and a visual element—position on the x-axis, position on the y-axis, the property of color, and so on—that faithfully represents that data. We’ll also work on understanding ggplots “flow of action” and the idea of plotting layers on top of layers. Along the way we will learn more geoms and other functions.



The slide deck for this week is available here.

View all slides in new window Download PDF of all slides


Tip: If you type ? (or shift + /) while going through the slides, you can see a list of special slide-specific commands.