%>%
starwars ____(species == "Human") %>%
ggplot(mapping = aes(____ = height, y = mass, ____ = gender)) +
____ = 17) +
geom_[____](____(x = "Height (cm)",
y = "Mass (kg)",
color = "Gender Expression"
)
ggplot
Review
This module consists of readings reviewing material typically taught in STAT 331. It is possible you can skip over portions of this reading. It is your responsibility to decide which areas you need to review before diving into Stat 541.
The Grammar of Graphics
You should feel comfortable with:
Knowing what goes into an aesthetic (
aes()
) versus the geometry (geom_*()
)Identifying these elements of existing plots
🎥 Recommended Video
Check-in:
ggplot
Review
Identify the elements of the following plot as
- An aesthetic
- A geometry
- A scale
- None of the above
- The x-axis is age
- The y-axis is “Urge to run up the down escalator”
- The y-axis ranges from “Weak” to “Strong”
- This is a line graph
- The two lines are “What I was supposed to feel” and “What I’ve actually felt”
- The lines are labeled with text
- Only even ages are labelled
- Stick figure people are sliding down the line
Using ggplot2
You should be comfortable with:
using the “big 5” geometries
changing optional arguments.
faceting
📖 Recommended Reading: R4DS: Data Visualisation
Checkin:
ggplot
Review
Fill in the six (6) blanks to make the following plot: