clPairs: Pairwise Scatter Plots showing Classification
Description
Creates a scatter plot for each pair of variables in given data.
Observations in different classes are represented by different symbols.Usage
clPairs(data, classification, symbols, colors, labels=dimnames(data)[[2]],
CEX=1, ...)
Arguments
data
A numeric vector, matrix, or data frame of observations. Categorical
variables are not allowed. If a matrix or data frame, rows
correspond to observations and columns correspond to variables.
classification
A numeric or character vector representing a classification of observations
(rows) of data
.
symbols
Either an integer or character vector assigning a plotting symbol to each
unique class in classification
. Elements in symbols
correspond to classes in order of appearance in the sequence of
observations (the order use
colors
Either an integer or character vector assigning a color to each
unique class in classification
. Elements in colors
correspond to classes in order of appearance in the sequence of
observations (the order used by the fu
labels
A vector of character strings for labeling the variables. The default
is to use the column dimension names of data
.
CEX
An argument specifying the size of the plotting symbols.
The default value is 1.
...
Additional arguments to be passed to the graphics device.
Side Effects
Scatter plots for each combination of variables in data
are
created on the current graphics device. Observations of different
classifications are labeled with different symbols.References
C. Fraley, A. E. Raftery, T. B. Murphy and L. Scrucca (2012).
mclust Version 4 for R: Normal Mixture Modeling for Model-Based
Clustering, Classification, and Density Estimation.
Technical Report No. 597, Department of Statistics, University of Washington.Examples
Run this codeclPairs(iris[,-5], cl=iris[,5], symbols=as.character(1:3))
Run the code above in your browser using DataLab