Description Usage Arguments Details Value Author(s) See Also Examples
Plots a scatterplot matrix, for which the variables shown horizontally do not necessarily coincide with those shown vertically. If desired, the matrix is divided into several blocks such that it fills more than 1 plot page.
codepanelDefault is the function to be applied for each subplot, unless a different function is provided.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | plmatrix(x, y = NULL, data = NULL, panel = panelDefault,
nrow = 0, ncol = nrow, save = TRUE, robrange. = FALSE, range. = NULL,
pch = 1, col = 1, reference = 0, ltyref = 3,
log = "", xaxs = "r", yaxs = "r",
xaxmar = NULL, yaxmar = NULL, xlabmar=NULL, ylabmar=NULL,
vnames = NULL, main = "", xlab = NULL, ylab = NULL,
cex = NA, cex.points = NA, cex.lab = 1, cex.text = 1.3, cex.title = 1,
bty = "o", oma = NULL, mar = rep(0.2, 4), keeppar = FALSE,
axes = TRUE, ...)
panelDefault(xx, yy, indx, indy, pch=par("pch"), col=par("col"),
cex=par("cex"), size=NULL, ...)
panel.smooth(xx, yy, indx, indy, pch=par("pch"), col=par("col"),
cex=par("cex"), ...)
|
x |
data for columns (x axis), or formula defining column variables. If it is a formula containing a left hand side, the left side variables will be used last. |
y |
data or formula for rows (y axis). Defaults to |
data |
data.frame containing the variables in case |
panel |
a function that generates the marks of the individual
panels, see Details.
Defaults essentially to |
nrow |
number of rows of panels on a page |
ncol |
number of columns of panels on a page |
save |
if y is not provided and |
robrange. |
if TRUE, robust plot ranges will be used |
range. |
plot ranges, given as a matrix with 2 rows (min, max)
and |
pch |
plotting character. A vector of integers, characters or strings can also be given for the default panel function |
col |
color(s) to be used for plotting the observations |
reference |
coordinates for reference lines to be shown in the panels. A named vector can be used to define a value for each or any variable. |
ltyref |
line type for reference lines |
log |
specifies logarithmic scale of axes. |
xaxs, yaxs |
styles for x and y axis, see |
xaxmar, yaxmar |
in which margin should the x- [y-] axis be tick-marked? |
xlabmar, ylabmar |
in which margin should the x- [y-] axis be labelled? |
vnames |
labels for the variables |
main |
main title for the plot (to be repeated on each plot page) |
xlab, ylab |
vectors of labels for x- and y-axes, a string for
each variable. This will override the |
cex, cex.points |
character expansion for showing the observations (both arguments are equivalent, cex has priority). |
cex.lab, cex.text |
character expansion for variable labels
in the margin and in the "diagonal", respectively,
relative to |
cex.title |
character expansion for the main title |
bty |
box type for each panel, see |
oma |
width of outer margins, ee |
mar |
margins for the panels |
keeppar |
logical. If TRUE, the graphical settings "mfrow", "mar", "cex", and "mgp" will be maintained, otherwise, the old values will be restored (default). |
axes |
logical. If TRUE, axes will be drawn and labels shown (default). |
... |
further arguments passed to the |
Arguments for panelDefault
and panel.smooth
xx |
values of the horizontal variable |
yy |
values of the vertical variable |
indx |
index of the variable shown horizontally, among the
|
indy |
index of the variable shown horizontally, among the
|
pch, col
plotting character and color, as usual
size |
size of sunflowers for plotting two factors |
The panel
function can be user written. It needs >=6
arguments which must correspond to the arguments of
panelDefault
, see above. If some arguments are not used,
just introduce them as arguments to the function anyway in order to
avoid (unnecessary) error messages and stops.
The names pch
and col
must appear among the argument
names.
panel.smooth
only calls panel.smooth
of the
graphics
package,
absorbing the arguments that are needed but not used.
Since large scatterplot matrices lead to tiny panels, plmatrix
splits the matrix into blocks of at most nrow
rows and
ncol
columns. If these numbers are missing, they default to
nrow=5
and ncol=6
for landscape pages, and to
nrow=8
and ncol=5
for portrait pages.
none
Werner A. Stahel, ETH Zurich
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.