ellipse | R Documentation |
Compute the x-y coordinates of an error ellipse.
ellipse(mean, cov, alpha = 0.05, n = 50)
mean |
two-element vector with the centre of the ellipse |
cov |
the |
alpha |
confidence level of the ellipse |
n |
the number of points at which the ellipse is evaluated |
a two-column matrix of plot coordinates
X <- rnorm(100,mean=100,sd=1) Y <- rnorm(100,mean=100,sd=1) Z <- rnorm(100,mean=100,sd=5) dat <- cbind(X/Z,Y/Z) plot(dat) ell <- ellipse(mean=colMeans(dat),cov=cov(dat)) polygon(ell)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.