plot.simpls | R Documentation |
Plot method for objects of class "simpls"
. This
function plots either the variables or the observations,
on the selected components (i.e. scores). Variables are
plotted inside the circle of correlations. Observations
are plotted on a scatter plot.
## S3 method for class 'simpls'
plot(x, what = "variables",
comps = c(1, 2), cex = 1, col.xlabels = "#5592e3",
col.ylabels = "#fe9429", yfont = 2, pos = NULL,
offset = 0.1, col.xarrows = "#5b9cf255",
col.yarrows = "#FE992955", lwd = 3, length = 0,
angle = 0, col.points = "#5592e3", pch = 21,
pt.bg = "#5b9cf255", show.names = FALSE, xpd = TRUE,
xlab = NULL, ylab = NULL, main = NULL,
col.main = "gray35", cex.main = 1.2,
col.axis = "gray40", show.grid = TRUE,
col.grid = "gray95", ...)
x |
An object of class |
what |
What to plot. Options are |
comps |
An integer vector of length two to indicate which components to plot |
cex |
Character expansion for labels and points. |
col.xlabels |
Color for labels of X-block variables. |
col.ylabels |
Color for labels of Y-block variables. |
yfont |
Integer for specifying which font to use for
Y-block labels. See |
pos |
Position for the text (see graphical
paramaters |
offset |
When |
col.xarrows |
Color for the X-block arrows. |
col.yarrows |
Color for the Y-block arrows. |
lwd |
The line width of arrows. |
length |
Length of the edges of the arrow head (in inches). |
angle |
Angle from the shaft of the arrow to the edge of the arrow head. |
col.points |
Color for the points when
|
pch |
Plotting character symbol to use (see
|
pt.bg |
Background (fill) color for the points given
by |
show.names |
Logical indicating whether to show
labels of points. Only used when
|
xpd |
Logical for controlling clipping region of names and labels. |
xlab |
A title for the x axis. |
ylab |
A title for the y axis. |
main |
Main title of the plot. |
col.main |
Color of main title. |
cex.main |
Character expansion of main title. |
col.axis |
Color of axis annotations (tick marks and labels). |
show.grid |
Logical indicating whether to show grid lines. |
col.grid |
Color of grid lines. Only used when
|
... |
Further arguments are passed to labels or points. |
Variables are displayed using the correlations of each
block of variables with the X-components: $cor.xt
and $cor.yt
.
Gaston Sanchez
simpls
## Not run:
# load dataset linnerud
data(linnerud)
# apply simpls
sim = simpls(linnerud[,1:3], linnerud[,4:6])
# plot variables (circle of correlations)
plot(sim, what="variables")
# plot observations (as points)
plot(sim, what="observations")
# plot observations with names
plot(sim, what="observations", show.names=TRUE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.