Get startedGet started for free

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

View Course

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 an aes col.
  • Note that the grader expects you to use the argument color instead of col; 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()
Edit and Run Code