To print the R graphics directly in R, use command dev.print.
The default for `dev.print' is to produce and print a postscript copy, if `options("printcmd")' is set suitably.
`dev.print' is most useful for producing a postscript print (its default) when the following applies. Unless `file' is specified, the plot will be printed. Unless `width', `height' and `pointsize' are specified the plot dimensions will be taken from the current device, shrunk if necessary to fit on the paper. (`pointsize' is rescaled if the plot is shrunk.) If `horizontal' is not specified and the plot can be printed at full size by switching its value this is done instead of shrinking the plot region.
If `dev.print' is used with a specified device (even `postscript') it sets the width and height in the same way as `dev.copy2eps'.
For `dev.copy2eps', `width' and `height' are taken from the current device unless otherwise specified. If just one of `width' and `height' is specified, the other is adjusted to preserve the aspect ratio of the device being copied. The default file name is `Rplot.eps'.
Example:
plot(hist(rnorm(100))) # plot histogram options("printcmd"="lpr -Poptra") # set default printer dev.print() # print the histogram to printer optra