plot,pdfCluster-method {pdfCluster} | R Documentation |
Plot objects of class pdfCluster
Description
Functions and methods for plotting objects of pdfCluster-class
.
Usage
## S4 method for signature 'pdfCluster'
plot(x, y, which = 1:4, stage = Inf, pch = NULL, col = NULL, ...)
Arguments
x |
An object of |
y |
Not used; for compatibility with generic plot; |
which |
To be used to select the type of plot:
Multiple choices are possible. |
stage |
Plots the data points at the indicated |
pch |
Either an integer specifying a symbol or a single character to be used in plotting points. If a vector of the same length as the number of groups is given,
different symbols or characters are used for different groups. The default value denotes points as their
group label. This argument applies if |
col |
Colors to be used in plotting points. If a vector of the same length as the number of groups is given,
different colors or characters are used for different groups. The default value use colors in palette corresponding to the the
group labels of the data. This argument applies if |
... |
Further arguments to be passed to |
Methods
signature(x = "pdfCluster", y = "missing")
-
S4 method for plotting objects of
pdfCluster-class
References
Azzalini A., Torelli N. (2007). Clustering via nonparametric density estimation. Statistics and Computing. vol. 17, pp. 71-80.
See Also
pdfCluster-class
, plot
, plot-methods
.
Examples
data(wine)
gr <- wine[,1]
# select a subset of variables
x <- wine[, c(2,5,8)]
#clustering
cl <- pdfCluster(x)
plot(cl, which=3, stage=2)
table(cl@clusters, gr)
#set "B" for Barolo, "G" for Grignolino, "A" for Barbera
plot(cl, pch=c("B", "G", "A"), col=c(3,4,5))