graphicsDevice        package:RGraphicsDevice        R Documentation

_I_n_s_t_a_n_t_i_a_t_e _G_r_a_p_h_i_c_s _D_e_v_i_c_e _i_m_p_l_e_m_e_n_t_e_d _w_i_t_h _R _f_u_n_c_t_i_o_n_s

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

     This is the general function and methods to create a graphics
     device whose primitive methods are implemented via R functions.

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

     graphicsDevice(name, dim = c(1024, 768), col = "black", fill = "transparent",
                     ps = 10, ..., funcs = list(...), ipr = rep(1/72.27, 2))

_A_r_g_u_m_e_n_t_s:

    name: either the name of the device or a 'RDevDescMethods-class'
          object. If the latter is suplied, we compute the name by
          calling the 'deviceName' function and invoking the method
          corresponding to this type. The resulting name is used in the
          '.Devices' list. This name is often a general description of
          the type of the device, i.e. not a desciption of the
          particular instance, although it can be as this would make it
          easier to identify the individual devices in the '.Devices'
          list.

     dim: a numeric/integer vector giving the width and height of the
          device.

     col: the default/starting drawing color

    fill: the default/starting  color used to fill rectangles, circles,
          etc.

      ps: the initial point size for the default font

     ...: zero or more name = value pairs which are used as  functions
          implementing the graphics device methods. The names must
          (partially) match the slot names of the
          'RDevDescMethods-class' class.

   funcs: this is an alternative way to specify functions that
          implement the graphics device methods. We use this when the
          functions are already in a list and it is akward to specify
          them via the ... mechanism. This can be 

     ipr: a numeric vector of length 2 giving the number if inches per
          raster/pixel for the horizontal and vertical dimensions.

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

     An object of class 'DevDescPtr-class'.

_A_u_t_h_o_r(_s):

     Duncan Temple Lang

_R_e_f_e_r_e_n_c_e_s:

     The R Internals Manual, R Development Core Team.

_S_e_e _A_l_s_o:

     'RDevDescMethods-class'

_E_x_a_m_p_l_e_s:

       devFuns = dummyDevice()
       dev = graphicsDevice("MyDummyDevice", funcs = devFuns)
       .Devices

       dev$right
       dev$right = 1000
       dev$bottom = 800

         # All important to get the plot region with adequate margins
       dev$ipr = rep(1/72.27, 2)
       dev$right
       dev$ipr

       as(dev, "DevDesc")

       plot(1:10)

         # warnings are coming from the lack of a return from functions that
         #

