Method to produce a 3D plot for a correspondence regression.
# S3 method for corregp
plot3d(x, axes = 1:3, y_btm = TRUE, y_ell = FALSE,
x_ell = FALSE, ysub = NULL, xsub = NULL, hlim = NULL, vlim = NULL,
dlim = NULL, asp = par3d("scale"), col_btm = "darkgrey",
col_top = "red", cex_btm = par3d("cex"), cex_top = cex_btm,
font_btm = par3d("font"), font_top = font_btm,
fam_btm = par3d("family"), fam_top = fam_btm, col_ell = "black",
lwd_ell = 1, lty_ell = "shade", opa_ell = 0.2, col_ori = "grey",
lwd_ori = 1, main = NULL, sub = NULL, hlab = NULL, vlab = NULL,
dlab = NULL, cl = 0.95, add_ori = TRUE, ...)
The output of a call to corregp
(i.e. an object of class "corregp").
The axes to plot: a vector of three values. Defaults to the first three axes.
Logical specifying whether the Y levels should be plotted first ("at the bottom") and then be overlaid by the X levels. Defaults to TRUE
.
Logical specifying whether the confidence ellipsoids of the Y levels should be plotted. Defaults to FALSE
.
Logical specifying whether the confidence ellipsoids of the X levels should be plotted. Defaults to FALSE
.
Vector of indices to select a subset of the Y levels.
Vector of indices to select a subset of the X levels.
Vector of two values specifying the lower and upper limit between which to plot the horizontal axis.
Vector of two values specifying the lower and upper limit between which to plot the vertical axis.
Vector of two values specifying the lower and upper limit between which to plot the "depth" axis.
The aspect ratio for the whole plot. See aspect3d
.
Color of the bottom levels: either numeric
or see colors
. Defaults to "darkgrey"
.
Color of the top levels: either numeric
or see colors
. Defaults to "red"
.
Character expansion factor of the bottom levels: a number to specify the size of the text labels.
Character expansion factor of the top levels: a number to specify the size of the text labels.
Font of the bottom levels: 1
for plain, 2
for bold, 3
for italic, and 4
for bold italic.
Font of the top levels: 1
for plain, 2
for bold, 3
for italic, and 4
for bold italic.
Font family of the bottom levels: can be "serif"
, "sans"
, "mono"
or code"symbol".
Font family of the top levels: can be "serif"
, "sans"
, "mono"
or "symbol"
.
Color of the confidence ellipsoids: either a number or see colors
. Defaults to "black"
.
Width of the confidence ellipsoids: a number to specify the line width.
Line type of the confidence ellipsoids: either "shade"
, "wire"
, or "dots"
. Defaults to "shade"
.
Opaqueness of the confidence ellipsoids: a number between 0
for fully transparent and 1
for fully opaque. Defaults to 0.2
.
Color of the lines through the origin: either a number or see colors
. Defaults to "grey"
.
Width of the lines through the origin: a number to specify the line width. Defaults to 1
.
The main title of the plot.
The subtitle of the plot.
The title of the horizontal axis.
The title of the vertical axis.
The title of the "depth" axis.
The confidence level for the confidence ellipsoids. Defaults to 0.95
.
Logical specifying whether to add lines through the origin. Defaults to TRUE
.
Further arguments passed to or from other methods.
A 3D plot window containing the output of a correspondence regression.
plot3d
(of a corregp
output) makes use of plot3d
(and text3d
and abclines3d
) from the package rgl.
# NOT RUN {
data(HairEye)
haireye.crg <- corregp(Eye ~ Hair * Sex, data = HairEye, b = 3000)
plot3d(haireye.crg, x_ell = TRUE, xsub = c("Hair", "Sex"))
# }
Run the code above in your browser using DataLab