grid.grob                package:grid                R Documentation

_C_r_e_a_t_e _a _G_r_i_d _G_r_a_p_h_i_c_a_l _O_b_j_e_c_t

_D_e_s_c_r_i_p_t_i_o_n:

     Creates a Grid graphical object.

_U_s_a_g_e:

     grid.grob(list.struct, cl = NULL, draw = TRUE)

_A_r_g_u_m_e_n_t_s:

list.struct: A list (preferably with each element named).

      cl: A string giving the class attribute for the 'list.struct'

    draw: A logical value to indicate whether to produce graphical
          output.

_D_e_t_a_i_l_s:

     A Grid graphical object provides a pointer to the 'list.struct'. 
     This has the important consequence that copies of the graphical
     object refer to the same 'list.struct'.

     All Grid primitives ('grid.lines', 'grid.rect', ...) and some
     higher-level Grid functions (e.g., 'grid.xaxis' and 'grid.yaxis')
     return graphical objects.

     Grid provides several useful functions for graphical objects
     (e.g., 'grid.draw' and 'grid.edit') which are designed to make it
     easier to produce new graphical objects.

_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.draw', 'grid.edit', 'grid.get', 'grid.copy'.

_E_x_a_m_p_l_e_s:

     ## Create a graphical object
     l <- grid.lines(draw=FALSE)
     ## View the list.struct
     grid.get(l)
     ## Copy by reference
     l2 <- l
     ## Edit the common list.struct
     grid.edit(l2, gp=gpar(col="green"))
     ## Copy by value
     l3 <- grid.copy(l)

