geom_point() function in r code example Example: geom_point r library(ggplot2) ggplot(diamonds, aes(x = x, y = y)) + geom_point()