grid.show.viewport package:grid R Documentation _D_r_a_w _a _D_i_a_g_r_a_m _o_f _a _G_r_i_d _V_i_e_w_p_o_r_t _D_e_s_c_r_i_p_t_i_o_n: This function uses Grid graphics to draw a diagram of a Grid viewport. _U_s_a_g_e: grid.show.viewport(v, parent.layout = NULL, newpage = TRUE, border.fill="light grey", vp.col="blue", vp.fill="light blue", scale.col="red", vp = NULL) _A_r_g_u_m_e_n_t_s: v: A Grid viewport object. parent.layout: A grid layout object. If this is not NULL and the viewport given in 'v' has its location specified relative to the layout, then the diagram shows the layout and which cells 'v' occupies within the layout. newpage: A logical value to indicate whether to move to a new page before drawing the diagram. border.fill: Colour to fill the border margin. vp.col: Colour for the border of the viewport region. vp.fill: Colour to fill the viewport region. scale.col: Colour to draw the viewport axes. vp: A Grid viewport object (or NULL). _D_e_t_a_i_l_s: A viewport is created within 'vp' to provide a margin for annotation, and the diagram is drawn within that new viewport. By default, the margin is filled with light grey, the new viewport is filled with white and framed with a black border, and the viewport region is filled with light blue and framed with a blue border. The diagram is annotated with the width and height (including units) of the viewport, the (x, y) location of the viewport, and the x- and y-scales of the viewport, using red lines and text. _V_a_l_u_e: None. _A_u_t_h_o_r(_s): Paul Murrell _S_e_e _A_l_s_o: Grid, 'viewport' _E_x_a_m_p_l_e_s: ## Diagram of a sample viewport grid.show.viewport(viewport(x=0.6, y=0.6, w=unit(1, "inches"), h=unit(1, "inches"))) grid.show.viewport(viewport(layout.pos.row=2, layout.pos.col=2:3), grid.layout(3, 4))