

postscript {base}                            R Documentation

_P_o_s_t_S_c_r_i_p_t _G_r_a_p_h_i_c_s

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

     `postscript' starts the graphics device driver for pro-
     ducing PostScript graphics.

     The auxiliary function `ps.options' can be used to set
     and view (if called without arguments) default values
     for the arguments to `postscript'.

_U_s_a_g_e_:

     postscript(file = "Rplots.ps", ...)
     ps.options(..., reset = FALSE, override.check = FALSE)
     .PostScript.Options

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

    file: a character string giving the name of the file to
          print to.

     ...: further options for `postscript()'.

   paper: the size of paper in the printer.  The choices are
          `"a4"', `"letter"', `"legal"' and `"executive"'.
          Also, `"special"' can be used, when the width and
          height specify the paper size.

horizontal: the orientation of the printed image, a logical.
          Defaults to true, that is landscape orientation.

width, height: the width and height of the graphics region
          in inches.  The default is to use the entire page
          less a 0.25 inch border.

  family: the font family to be used.  This must be one of
          `"AvantGarde"', `"Bookman"', `"Courier"', `"Hel-
          vetica"', `"Helvetica-Narrow"', `"NewCentu-
          rySchoolbook"', `"Palatino"' or `"Times"'.

pointsize: the default point size to be used.

      bg: the default background color to be used.

      fg: the default foreground color to be used.

 onefile: logical: if true (the default) allow multiple fig-
          ures in one file. If false, assume only one figure
          and give EPSF header and no `DocumentMedia' com-
          ment.

pagecentre: logical: should the device region be centred on
          the page: defaults to true.

print.it, append: logical; are currently disregarded; just
          there for compatibility reasons.

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

     `postscript(..)' opens the file `file' and the
     PostScript commands needed to plot any graphics
     requested are stored in that file.  This file can then
     be printed on a suitable device to obtain hard copy.

     The postscript produced by R is EPS (Encapsulated
     PostScript) compatible, and can be included into other
     documents, e.g. into LaTeX, using `\psfig{file=<file-
     name>}'. For use in this way you will proabbly want to
     set `horizontal=FALSE, onefile=FALSE, paper="special"'.

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

     `Devices', {`check.options' which is called from both
     `ps.options' and `postscript'.}

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

      # open the file "foo.ps" for graphics output
      postscript("foo.ps")

     dev.off()               # turn off the postscript device

     all(unlist(ps.options()) == unlist(.PostScript.Options))
     ps.options(bg = "pink")
     str(ps.options(reset = TRUE))

     ##- error checking of arguments:
     ps.options(width=0:12, onefile=0, bg=pi)

     ## override the check for 'onefile', but not the others:
     str(ps.options(width=0:12, onefile=1, bg=pi, override.check = c(F,T,F)))

