3.5 Scatterplot: geom_point()

ggplot(mpg, aes(x = displ, y = hwy)) + 
  geom_point()

  • The shape parameter is useful here.
    • interested in the different shapes? ?shape
ggplot(mpg, aes(x = displ, y = hwy, shape = factor(cyl))) + 
  geom_point()