plmatrix | R Documentation |
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.
plmatrix(x, y = NULL, data = NULL, panel = NULL,
nrow = NULL, ncol = nrow, reduce = TRUE,
xaxmar=NULL, yaxmar=NULL, xlabmar=NULL, ylabmar=NULL,
xlab=NULL, ylab=NULL, mar=NULL, oma=NULL, diaglabel.csize = NULL,
plargs = NULL, ploptions = NULL, assign = TRUE, ...)
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. |
nrow, ncol |
maximum number of rows and columns of panels on a page |
reduce |
if y is not provided and |
xaxmar, yaxmar |
margin in which the axis (tick marks and
corresponding labels) should be shown: either 1 or 3 for
|
xlabmar, ylabmar |
in which margin should the x- [y-] axis be labelled? |
xlab, ylab |
not used (introduced to avoid confusion with
|
mar, oma |
width of margins, see |
diaglabel.csize |
Character expansion for labels appearing in the "diagonal" of the scatterplot matrix (if present) |
plargs |
result of calling |
ploptions |
list of pl options. |
assign |
logical: Should the plargs be stored in the |
... |
further arguments passed to the |
The panel
function can be user written. It needs >=5
arguments which must correspond to the arguments of
plpanel
: x, y, indx, indy, plargs
.
If some arguments are not used, just introduce them as arguments
to the function anyway in order to avoid (unnecessary) error messages
and stops.
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.
The panel
argument defaults to plpanel
, which results
essentially in points
or text
depending on the argument pch
, including a smooth line,
to plmboxes
if 'x' is a factor and 'y' is not or
vice versa,
or to a modification of sunflowers
if both are factors.
The function must have the arguments x
and y
to take the coordinates of the points and may have the arguments
indx
and indy
to transfer the variables\' index.
If there is an argument plargs
, the current value of
plargs
will be passed on. It is a list and can be extended
to pass any additional items to the function.
none
There are many more arguments, obtained from pl.control
,
see ?pl.control
. These can be passed to plmatrix
by an argument plargs
that is hidden in the ... argument list.
Werner A. Stahel, ETH Zurich
pairs
, plyx
plmatrix(iris, pch=as.numeric(Species))
plmatrix(~Sepal.Length+Sepal.Width, ~Petal.Length+Petal.Width,
data=iris, smooth=TRUE, plab=substr(Species,1,2))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.