Produce a Scatterplot Matrix

DESCRIPTION:

Produces all pairwise scatter plots of the variables in a data matrix.

USAGE:

pairs.default(x, labels=<<see below>>, panel=points, invert=T, ...) 

REQUIRED ARGUMENTS:

x
matrix of data to be plotted. Missing values ( NAs) are allowed.

OPTIONAL ARGUMENTS:

labels
character vector for labeling the x and y axes of the plots. The strings labels[1], labels[2], etc., are the labels for the 1st, 2nd, etc., columns of x. If supplied, the labels vector must have length equal to ncol(x). If x has a dimnames attribute, the labels are the column labels; otherwise, the default labels are derived from the name of the argument.
panel
function to produce the graphical representation. The function should have as its arguments the vectors of data x and y to be plotted on one panel, along with any graphical parameters that were given to pairs.
invert
logical flag: if invert=TRUE, the names of the variables are in the upper left to lower right diagonal panels. If invert=FALSE, the variable names are in the lower left to upper right diagonal.
...
General graphical parameters (e.g., col and cex) may also be supplied as arguments to this function. See the par help file for more details. Currently, pairs.default passes graphical parameters to both plot and points, so the parameters must be accepted by both functions. This means, for example, that xlim and ylim are not accepted by pairs.default, since they are high-level parameters that can only be given to plot.

SIDE EFFECTS:

a plot, using the function given by panel, is produced for each pair of columns of x.

DETAILS:

At the time panel is called, the coordinate system has already been set to accommodate the data.

Each individual scatter plot will not display points that involve NAs or Infs; these observations may appear in other plots, however.

SEE ALSO:

, , , .

EXAMPLES:

pairs(longley.x) 
# plot each panel with a smooth line 
pairs(longley.x, panel=function(x,y,...) 
   { points(x,y,...); lines(lowess(x,y),...) } )