Dev               package:RandomFields               R Documentation

_C_h_o_o_s_i_n_g _t_h_e _d_e_v_i_c_e

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

     'Dev' chooses between the graphical devices screen, postscript and
     pdf

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

     Dev(on, dev, ps=NULL, cur.cex=TRUE, paper="special", width=5, height=5,
         quiet=FALSE, ...)

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

      on: logical. Indicates whether 'dev' should be switched on or off

     dev: see Details

      ps: name of the pdf or postscript file

 cur.cex: logical.  If 'TRUE' the par parameters of the current device
          are used, not the standard parameters

   paper: kind of paper. Postscript parameter

   width: width of figure. Postscript and pdf parameter

  height: height of figure. Postscript and pdf parameter

   quiet: logical.  If 'FALSE' additional information is given.

     ...: further parameters for pdf or postscript

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

     The parameter 'dev' might be

     _l_o_g_i_c_a_l If suffix of 'ps' is either "eps", "ps" or "pdf" the
          respective file is created. Otherwise, a postscript file
          ending with suffix "eps" is created if 'dev=TRUE' and a pdf
          file with suffix "pdf" if 'dev=FALSE'

     _c_h_a_r_a_c_t_e_r A function with name 'dev' is called, and the suffix
          'dev' is added to 'ps'

     _n_u_m_e_r_i_c 'Dev' switches to the device with number 'dev'; if such a
          device does not exist, a new X11 device is created. If
          'dev<2' the device opened by 'Dev(on=TRUE,...)' is closed by
          'Dev(on=FALSE)'; otherwise only 'par(new=F)' is applied to
          the device.

          The parameters 'dev', 'ps', 'cur.cex', 'paper', 'width',
          'height' and '...' are ignored if 'on=FALSE'.

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

     'NULL'. Side effect is that the global variable '.dev.orig' is
     created when 'Dev(on=TRUE,...)' is called.

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

     Martin Schlather, martin.schlather@cu.lu <URL:
     http://www.cu.lu/~schlathe>

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

       ## first an eps-file test.eps is created, then a jpeg-file,
       ## finally the figure is plotted on the screen
       dir(pattern="test*")
       for (dev in list(TRUE, "jpeg", 1)) {
         print(dev)
         size <- if (dev=="jpeg") 450 else 5
         Dev(TRUE, dev, ps="test", height=size, width=size)
         plot(0, 0, main=paste("dev=", dev))
         # readline("press return")
         Dev(FALSE)
       }
       dir(pattern="test*")

