box                 package:graphics                 R Documentation

_D_r_a_w _a _B_o_x _a_r_o_u_n_d _a _P_l_o_t

_D_e_s_c_r_i_p_t_i_o_n:

     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.

_U_s_a_g_e:

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

_A_r_g_u_m_e_n_t_s:

   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'.  Note that 'xpd' is not accepted as clipping is
          always to the device region.

_D_e_t_a_i_l_s:

     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")'.

_R_e_f_e_r_e_n_c_e_s:

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

_S_e_e _A_l_s_o:

     'rect' for drawing of arbitrary rectangles.

_E_x_a_m_p_l_e_s:

     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')

