View source: R/plotly_ellipse.R
plotly_ellipse | R Documentation |
plotly
This is an updated version of ellipse
. For more technical details, please refer to ellipse
.
plotly_ellipse(mu, sigma, alpha=.05, npoints=250, draw=TRUE, cex = 3, col = "#1f77b4", lwd = 3, title = "", title.x = 0.5, title.y = 0.95, title.size = 15, xlab = "X", xlab.size = 15, xtick.size = 15, ylab = "Y", ylab.size = 15, ytick.size = 15)
mu |
A 2-vector giving the mean. |
sigma |
A 2x2 matrix giving the covariance matrix. |
alpha |
Probability to be excluded from the ellipse. The default value is alpha = .05, which results in a 95% ellipse. |
npoints |
Number of points comprising the border of the ellipse. |
draw |
If TRUE, draw the ellipse. |
cex |
Size of markers. |
lwd |
Line width of the ellipse. |
col |
Color of both markers and lines. |
title |
Text of the main title. |
title.size |
Size of the main title. |
title.x |
Horsizontal position of the main title. |
title.y |
Vertical posotion of the main title. |
xlab |
Label of X-axis. |
xlab.size |
Size of the lable of X-axis. |
xtick.size |
Size of tick lables of X-axis. |
ylab |
Label of Y-axis. |
ylab.size |
Size of the lable of Y-axis. |
ytick.size |
Size of tick lables of Y-axis. |
plotly_ellipse
returns an npoints
x2 matrix of the points forming the
border of the ellipse.
Johnson, R. A. and Wichern, D. W. (2002) Applied Multivariate Statistical Analysis, Fifth Edition, Prentice Hall.
regcr
, ellipse
## Produce a 95% ellipse with the specified mean and covariance structure. mu <- c(1, 3) sigma <- matrix(c(1, .3, .3, 1.5), 2, 2) plotly_ellipse(mu, sigma, npoints = 200)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.