splom(formula,
data,
aspect = 1,
between = list(x = 0.5, y = 0.5),
panel = if (is.null(groups)) "panel.splom" else "panel.superpose",
superpanel = "panel.pairs",
pscales = 5,
varnames, ...)
parallel(formula,
data = list(x = 0.5, y = 0.5),
between,
panel = "panel.parallel",
varnames,
...)
~ x | g1 * g2 * ...
, where x
is a data frame or a matrix. Each of g1,g2,...
must be
either factors or shingles. The conditioningsplom
.densityplot
.splom
produces Scatter Plot Matrices. The role usually played by
panel
is taken over by superpanel
, which determines how
the columns of x
are to be arranged for pairwise plots. The
only available option currently is panel.pairs
. (Writing new
superpanel functions would need knowledge of grid.) The scales
argument does not have its usual interpretation in
splom
. Its function is partly served by pscales
. However,
components of scale which are sensible would be supported (in future
if not already supported). The rot
component should be
specified as a vector of length 2 for the labels of the horizontal and
vertical labels respectively.
parallel
draws Parallel Coordinate Plots. (Difficult to
describe, see example.)
These and all other high level Trellis functions have several
arguments in common. These are extensively documented only in the
help page for xyplot
, which should be consulted to learn more
detailed usage.
xyplot
, Lattice
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