| plot.factorial | R Documentation |
Plot PCA, CA or MCA.
## S3 method for class 'factorial'
plot(
x,
type = c("ind", "cor", "eig"),
axes = c(1, 2),
col = NULL,
pch = NULL,
labels = FALSE,
legendpos = "topleft",
...
)
x |
The PCA, CA or MCA result (object of class |
type |
The graph to plot. |
axes |
The factorial axes to be printed (numeric |
col |
Color(s) of the individuals ( |
pch |
Point style(s) of the individuals on the scatter plot ( |
labels |
Whether the row names are shown instead of points ( |
legendpos |
Position of the legend ( |
... |
Other parameters. |
CA, MCA, PCA, plotdata, plot.CA, plot.MCA, plot.PCA, factorial-class
require (datasets)
data (iris)
pca = PCA (iris, quali.sup = 5)
plot (pca) # Automatically colored/legended by the qualitative supplementary variable
plot (pca, type = "cor")
plot (pca, type = "eig")
# Overriding colors and point styles manually (e.g. by an external clustering)
km = KMEANS (iris [, -5], k = 3)
plot (pca, col = km$cluster + 1, pch = km$cluster + 1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.