data(iris)
super.sym <- trellis.par.get("superpose.symbol")
splom(~iris[1:4], groups = Species, data = iris,
panel = panel.superpose,
key = list(title = "Three Varieties of Iris",
columns = 3,
points = list(pch = super.sym$pch[1:3],
col = super.sym$col[1:3]),
text = list(c("Setosa", "Versicolor", "Virginica"))))
splom(~iris[1:3]|Species, data = iris,
layout=c(2,2), pscales = 0,
varnames = c("Sepal
Length", "Sepal
Width", "Petal
Length"),
page = function(...) {
grid.text(x = seq(.6, .8, len = 4),
y = seq(.9, .6, len = 4),
label = c("Three", "Varieties", "of", "Iris"),
gp = gpar(fontsize=20))
})
Run the code above in your browser using DataLab