drawEllipse | R Documentation |
Adds an ellipse to an existing plot.
drawEllipse(x, shape, radius, nv = 100, axes = FALSE, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex')) ## S3 method for class 'list' drawEllipse(x, shape, radius, nv = 100, axes = FALSE, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex')) ## Default S3 method: drawEllipse(x, shape, radius, nv = 100, axes = FALSE, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))
x |
either a numerical 2-vector giving the (x,y)-coordinates of the center or a list with the components |
shape |
a numerical symmetric (2 x 2)-matrix whose eigen-structure determines the ellipse's shape. |
radius |
a numerical value giving the ellipse's magnification factor. |
nv |
number of vertices in the approximating polygon. |
axes |
logical: should ellipse axes be drawn? |
fg |
color of the ellipse's rim. |
bg |
the ellipse's fill color. Set to |
colCtr |
color of the center point. Set to |
lty |
line type of the ellipse. |
lwd |
line width of the ellipse. |
pch |
symbol used for the center of the ellipse. |
cex |
magnification factor for the symbol used for the center of the ellipse. |
This function is mainly a wrapper for polygon
.
polygon
,
getConfEll
,
getMinEllipse
## error ellipse for a set of points xy <- matrix(round(rnorm(100, 0, 8), 2), ncol=2) ce <- getConfEll(xy) plot(xy, pch=16, asp=1) drawEllipse(ce, radius=1, axes=TRUE, fg='blue', colCtr='blue', lwd=2, pch=4, cex=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.