| box {graphics} | R Documentation |
Draw a Box around a Plot
Description
This function draws a box around the current plot in the given color
and line type. The bty parameter determines
the type of box drawn. See par for details.
Usage
box(which = "plot", lty = "solid", ...)
Arguments
which |
character, one of |
lty |
line type of the box. |
... |
further graphical parameters, such as |
Details
The choice of colour is complicated. If col was supplied
and is not NA, it is used. Otherwise, if fg was supplied
and is not NA, it is used. The final default is par("col").
References
Becker RA, Chambers JM, Wilks AR (1988). The New S Language. Chapman and Hall/CRC, London.
See Also
rect for drawing of arbitrary rectangles.
Examples
plot(1:7, abs(stats::rnorm(7)), type = "h", axes = FALSE)
axis(1, at = 1:7, labels = letters[1:7])
box(lty = '1373', col = 'red')
[Package graphics version 4.6.0 Index]