viz_variables {dimensio} | R Documentation |
Visualize Variables Factor Map
Description
Plots column/variable principal coordinates.
Usage
viz_variables(x, ...)
viz_columns(x, ...)
## S4 method for signature 'MultivariateAnalysis'
viz_columns(
x,
...,
axes = c(1, 2),
active = TRUE,
sup = TRUE,
labels = FALSE,
labels_max = 10,
highlight = NULL,
xlim = NULL,
ylim = NULL,
main = NULL,
sub = NULL,
panel.first = NULL,
panel.last = NULL,
legend = list(x = "topleft")
)
## S4 method for signature 'MultivariateBootstrap'
viz_columns(x, ..., axes = c(1, 2))
## S4 method for signature 'PCA'
viz_variables(
x,
...,
axes = c(1, 2),
active = TRUE,
sup = TRUE,
labels = TRUE,
labels_max = 10,
highlight = NULL,
xlim = NULL,
ylim = NULL,
main = NULL,
sub = NULL,
panel.first = NULL,
panel.last = NULL,
legend = list(x = "topleft")
)
## S4 method for signature 'CA'
viz_variables(
x,
...,
axes = c(1, 2),
active = TRUE,
sup = TRUE,
labels = FALSE,
labels_max = 10,
highlight = NULL,
xlim = NULL,
ylim = NULL,
main = NULL,
sub = NULL,
panel.first = NULL,
panel.last = NULL,
legend = list(x = "topleft")
)
## S4 method for signature 'BootstrapPCA'
viz_variables(x, ..., axes = c(1, 2))
Arguments
x |
|
... |
Further graphical parameters (see details). |
axes |
A length-two |
active |
A |
sup |
A |
labels |
A |
labels_max |
An |
highlight |
A vector specifying the information to be highlighted.
If |
xlim |
A length-two |
ylim |
A length-two |
main |
A |
sub |
A |
panel.first |
An |
panel.last |
An |
legend |
A |
Details
Commonly used graphical parameters are:
pch
A vector of plotting characters or symbols. This can either be a single character or an integer code for one of a set of graphics symbols.
cex
A numerical vector giving the amount by which plotting characters and symbols should be scaled relative to the default.
lty
A vector of line types.
lwd
A vector of line widths.
col
The colors for lines and points. Multiple colors can be specified so that each point can be given its own color.
bg
The background color for the open plot symbols given by
pch = 21:25
.
Value
viz_*()
is called for its side-effects: it results in a graphic
being displayed. Invisibly returns x
.
Note
Be careful: graphical parameters are silently recycled.
Author(s)
N. Frerebeau
See Also
Other plot methods:
biplot()
,
screeplot()
,
viz_contributions()
,
viz_individuals()
,
viz_wrap
,
wrap
Examples
## Load data
data("iris")
## Compute principal components analysis
X <- pca(iris, scale = TRUE)
## Plot individuals
viz_individuals(X, panel.last = graphics::grid())
## Plot variables
viz_variables(X, panel.last = graphics::grid())
## Graphical parameters
## Continuous values
viz_individuals(X, highlight = iris$Petal.Length, pch = 16)
viz_individuals(X, highlight = iris$Petal.Length, pch = 16,
col = grDevices::hcl.colors(12, "RdPu"))
viz_individuals(X, highlight = iris$Petal.Length, pch = 16,
col = grDevices::hcl.colors(12, "RdPu"),
cex = c(1, 2))
viz_variables(X, highlight = "contribution",
col = grDevices::hcl.colors(12, "BluGrn", rev = TRUE),
lwd = c(1, 5))
## Discrete values
viz_individuals(X, highlight = iris$Species, pch = 21:23)
viz_individuals(X, highlight = iris$Species, pch = 21:23,
bg = c("#004488", "#DDAA33", "#BB5566"),
col = "black")
viz_variables(X, highlight = c("Petal", "Petal", "Sepal", "Sepal"),
col = c("#EE7733", "#0077BB"),
lty = c(1, 3))