Exercise 7. geom_point text
If instead of points we want to add text, we can use the geom_text()
or geom_label()
geometries. However, note that the following code
murders %>% ggplot(aes(population, total)) +
geom_label()
will give us the error message:
Error: geom_label requires the following missing aesthetics: label
Why is this?
This exercise is part of the course
Data Science Visualization - Module 2
Hands-on interactive exercise
Turn theory into action with one of our interactive exercises
