Exercise 10. geom_point colors 2
Now let's go ahead and make the labels blue. We previously wrote this code to add labels to our plot:
murders %>% ggplot(aes(population, total, label= abb)) +
geom_label()
Now we will edit this code.
This exercise is part of the course
Data Science Visualization - Module 2
Exercise instructions
- Rewrite the code above to make the labels blue by adding an argument to
geom_label
. - You do not need to put the
color
argument inside of anaes
col. - Note that the grader expects you to use the argument
color
instead ofcol
; these are equivalent.
Hands-on interactive exercise
Have a go at this exercise by completing this sample code.
murders %>% ggplot(aes(population, total,label= abb)) +
geom_label()