powered by
Adds an axis-aligned box to an existing plot.
drawBox(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))# S3 method for list drawBox(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))# S3 method for default drawBox(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))
# S3 method for list drawBox(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))
# S3 method for default drawBox(x, fg = par('fg'), bg = NA, colCtr = NA, lty = par('lty'), lwd = par('lwd'), pch = par('pch'), cex = par('cex'))
either a list with component pts as returned by getBoundingBox, or a vector giving coordinates xleft, ybottom, xright, ytop.
pts
getBoundingBox
color of the box' rim.
the box' fill color. Set to NA for a fully transparent box.
NA
color of the center point. Set to NA to omit.
line type of the box.
line width of the box.
symbol used for the center of the box.
magnification factor for the symbol used for the center of the box.
This function is mainly a wrapper for rect.
rect
getBoundingBox, rect
xy <- matrix(round(rnorm(20, 100, 15), 1), ncol=2) (bb <- getBoundingBox(xy)) plot(xy, asp=1, pch=16) drawBox(bb, fg='blue', colCtr='blue', pch=4, cex=2)
Run the code above in your browser using DataLab