powered by
Highlights several groups or clusters on a biplot representation.
PlotBiplotClusters(A, Groups = ones(c(nrow(A), 1)), TypeClus = "st", ClusterColors = NULL, ClusterNames = NULL, centers = TRUE, ClustConf = 1, Legend = FALSE, LegendPos = "topright", CexClustCenters = 1, ...)
It takes effects on a plot
Coordinates of the points in the scattergram
Factor defining the groups to be highlited
Type of representation of the clusters. For the moment just a convex hull but in the future ellipses and stars will be added.
A vector of colors with as many elements as clusters. If NULL the function slects the raibow colors.
NULL
A vector of names with as many elements as clusters.
Logical variable to control if centres of the clusters are plotted
Percent of points included in the cluster. only the ClusConf percent of the points nearest to the center will be used to calculate the cluster
Should a legend be plotted
Position of the legend.
Size of the cluster centres.
Any other graphical parameters
Jose Luis Vicente Villardon
The clusters to plot should be added to the biplot object using the function AddCluster2Biplot.
AddCluster2Biplot
data(iris) bip=PCA.Biplot(iris[,1:4]) bip=AddCluster2Biplot(bip, NGroups=3, ClusterType="us", Groups=iris[,5], Original=FALSE) plot(bip, PlotClus = TRUE)
Run the code above in your browser using DataLab