baseViewports            package:gridBase            R Documentation

_G_e_n_e_r_a_t_e _g_r_i_d _V_i_e_w_p_o_r_t_s _f_r_o_m _B_a_s_e _P_l_o_t

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

     This will generate a list of grid viewports which correspond to
     the current inner, figure, and plot regions of the current base
     plot.

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

     baseViewports()

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

     The figure region is relative to the inner region so you must push
     the inner region before pushing the figure region. Similarly, the
     plot region is relative to the figure region so this should only
     be pushed after the previous two.

_V_a_l_u_e:

     A list with three elements: 

  inner : A viewport corresponding to the inner region of the current
          plot.

 figure : A viewport corresponding to the figure region of the current
          plot.

   plot : A viewport corresponding to the plot region of the current
          plot.

_W_a_r_n_i_n_g:

     If you resize the device, all bets are off!

_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:

     par(oma=rep(1, 4), mfrow=c(1, 2), xpd=NA)
     plot(1:10)
     vps <- baseViewports()
     pushViewport(vps$inner)
     grid.rect(gp=gpar(lwd=3, col="red"))
     pushViewport(vps$figure)
     grid.rect(gp=gpar(lwd=3, col="green"))
     pushViewport(vps$plot)
     grid.rect(gp=gpar(lwd=3, col="blue"))
     grid.points(1:10, 10:1)

