# Scatter plot matrix for the Iris data set
# Load the Iris data set:
data(iris)
# Use the pairs() function to get the matrix of scatter plots by species:
pairs(iris[1:4], pch = 23, main = "Figure 2: Scatter Plot Matrix for the Iris Data Set \n Red = Setosa, Green = Versicolor, Orange = Virginica",
font.main = 1, cex.main = 1.1, bg = c("red", "green", "orange")[unclass(iris$Species)])