grid.frame               package:grid               R Documentation

_C_r_e_a_t_e _a _F_r_a_m_e _f_o_r _P_a_c_k_i_n_g _O_b_j_e_c_t_s

_D_e_s_c_r_i_p_t_i_o_n:

     This function, together with 'grid.pack' is part of a
     GUI-builder-like interface to constructing graphical images. The
     idea is that you create a frame with this function then use
     'grid.pack' to pack objects into the frame.

_U_s_a_g_e:

     grid.frame(layout=NULL, vp=NULL, gp=gpar(), draw=FALSE)

_A_r_g_u_m_e_n_t_s:

  layout: A Grid layout, or NULL. This can be used to initialise the
          frame with a number of rows and columns, with initial widths
          and heights, etc. 

      vp: An object of class 'viewport', or NULL. 

      gp: An object of class 'gpar';  typically the output from a call
          to the function 'gpar'.

    draw: Should the frame be drawn.  Nothing will actually be drawn,
          but it will put the frame on the display list, which means
          that the output will be dynamically updated as objects are
          packed into the frame.  Possibly useful for debugging.

_V_a_l_u_e:

     An object of class '"grob"'.

_A_u_t_h_o_r(_s):

     Paul Murrell

_S_e_e _A_l_s_o:

     'grid.pack'

_E_x_a_m_p_l_e_s:

     grid.newpage()
     gf <- grid.frame(draw=TRUE)
     grid.pack(gf, grid.rect(draw=FALSE, gp=gpar(fill="grey")))
     grid.pack(gf, grid.text("hi there", draw=FALSE), side="right")

