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 linetype. The `bty` parameter determines the type of box drawn. See `par` for details.

### Usage

    box(which = "plot", lty = "solid", ...)

### Arguments

`which` | character, one of `"plot"`, `"figure"`, `"inner"` and `"outer"`.
`lty` | line type of the box.
`...` | further graphical parameters, such as `bty`, `col`, or `lwd`, see `par`.

### References

Becker, R. A., Chambers, J. M. and Wilks, A. R. (1988) The New S Language. Wadsworth & Brooks/Cole.

### See Also

`rect` for drawing of arbitrary rectangles.

### Examples

    plot(1:7,abs(rnorm(7)), type='h', axes = FALSE)
    axis(1, labels = letters[1:7])
    box(lty='1373', col = 'red')

[Package graphics version 2.1.1 Index]