dev.xxx                 package:base                 R Documentation

_C_o_n_t_r_o_l _M_u_l_t_i_p_l_e _D_e_v_i_c_e_s

_D_e_s_c_r_i_p_t_i_o_n:

     These functions provide control over multiple graphics devices.

     Only one device is the active device.  This is the device in which
     all graphics operations occur.

     Devices are associated with a name (e.g., "X11"  or "postscript")
     and a number;  the "null device" is always device 1.

     `dev.off' shuts down the specified (by default the current)
     device. `graphics.off()' shuts down all open graphics devices.

     `dev.set' makes the specified device the active device.

     A list of device names is stored in `.Devices'. The name of the
     active device is stored in `.Device'.

_U_s_a_g_e:

     dev.cur()
     dev.list()
     dev.next(which = dev.cur())
     dev.prev(which = dev.cur())
     dev.off(which = dev.cur())
     dev.set(which = dev.next())
     graphics.off()

_A_r_g_u_m_e_n_t_s:

   which: An integer specifying a device number

_V_a_l_u_e:

     `dev.cur' returns the number and name of the active device.

     `dev.list' returns the numbers and names of all devices.

     `dev.next' returns the number and name of the next device in the
     list of devices.

     `dev.prev' returns the number and name of the previous device in
     the list of devices.

     `dev.off' returns the name and number of the new active device
     (after the specified device has been shut down).

     `dev.set' returns the name and number of the new active device.

_S_e_e _A_l_s_o:

     `Devices', such as `postscript', etc; `graphics.off' for closing
     all devices; `layout' and its links for setting up plotting
     regions on the current device.

_E_x_a_m_p_l_e_s:

     x11()
     plot(1:10)
     x11()
     plot(rnorm(10))
     dev.set(dev.prev())
     abline(0,1)# through the 1:10 points
     dev.set(dev.next())
     abline(h=0, col="gray")# for the residual plot
     dev.set(dev.prev())
     dev.off(); dev.off()#- close the two X devices

