R Language Scatter Plots


Example

We plot a simple scatter plot using the builtin iris data set as follows:

library(ggplot2)
ggplot(iris, aes(x = Petal.Width, y = Petal.Length, color = Species)) + 
  geom_point()

This gives: Sample scatter plot using iris dataset