| ggbiplot | R Documentation |
Renders a custom publication-ready biplot for PCA models created via
prcomp(), princomp(), FactoMineR::PCA(), or MASS::lda().
ggbiplot(
pcobj,
choices = 1:2,
scale = 1,
pc.biplot = TRUE,
obs.scale = 1 - scale,
var.scale = scale,
groups = NULL,
ellipse = FALSE,
ellipse.prob = 0.68,
labels = NULL,
labels.size = 3,
alpha = 1,
var.axes = TRUE,
circle = FALSE,
circle.prob = 0.69,
varname.size = 3,
varname.adjust = 1.5,
varname.abbrev = FALSE,
...
)
pcobj |
Object. A PCA object returned by |
choices |
Numeric vector of length 2. Indices of principal components to plot. Default |
scale |
Numeric. Scale factor (0 or 1). Covariance biplot (scale = 1), form biplot (scale = 0). Default 1. |
pc.biplot |
Logical. If |
obs.scale |
Numeric. Scale factor applied to observations. Default |
var.scale |
Numeric. Scale factor applied to variables. Default |
groups |
Factor. Optional grouping variable to color-code observations. Default |
ellipse |
Logical. If |
ellipse.prob |
Numeric. Probability level for concentration ellipse size. Default |
labels |
Character vector. Optional custom labels for observations. Default |
labels.size |
Numeric. Text size used for observation labels. Default |
alpha |
Numeric [0, 1]. Transparency for points. Default |
var.axes |
Logical. If |
circle |
Logical. If |
circle.prob |
Numeric. Size of the correlation circle in Normal probability. Default |
varname.size |
Numeric. Text size for variable names. Default |
varname.adjust |
Numeric. Adjustment factor for variable name placement ( |
varname.abbrev |
Logical. If |
... |
Additional arguments passed to |
A ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.