drawBox2 | R Documentation |
Adds an oriented box to an existing plot.
drawBox2(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex')) ## S3 method for class 'list' drawBox2(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex')) ## Default S3 method: drawBox2(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))
x |
either a list with component |
fg |
color of the box' rim. |
bg |
the box' fill color. Set to |
colCtr |
color of the center point. Set to |
lty |
line type of the box. |
lwd |
line width of the box. |
pch |
symbol used for the center of the box. |
cex |
magnification factor for the symbol used for the center of the box. |
This function is mainly a wrapper for polygon
.
getMinBBox
,
polygon
xy <- matrix(round(rnorm(20, 100, 15), 1), ncol=2) (bb <- getMinBBox(xy)) plot(xy, xlim=range(c(xy[ , 1], bb$pts[ , 1])), ylim=range(c(xy[ , 2], bb$pts[ , 2])), asp=1, pch=16) drawBox2(bb, fg='blue', colCtr='blue', pch=4, cex=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.