Create a scatter plot with ggplot

  • Define a dataset for the plot using the ggplot() function
  • Specify a geometric layer using the geom_point() function
  • Map attributes from the dataset to plotting properties using the mapping parameter
  • Connect different ggplot objects using the + operator
library(ggplot2)
ggplot(___) + 
  geom_point(
    mapping = aes(x = ___, y = ___)
  )
View Interactive Version
Create a scatter plot with ggplot