Next: Saving graphics as pdf
Up: Graphics and output
Previous: Outputting tables to Latex
- in R
- >postscript(file=file.eps,horiz=TRUE,onefile=FALSE,width=8.5,height=11,paper=letter)
- the 'onefile' part makes an eps file rather than a ps;
use 'onefile=TRUE' to get regular ps; eps is good for embedding
in Latex files
- R graphics commands.....
- >dev.off() #this kills of the device and closes the postscript
file - I have had printing problems if I don't do this
- a second way in R
- R graphics commands ...
- dev.copy2eps(file=file.eps,width=4)
# note that if you specify both width and height, the aspect ratio
may not be preserved; also note that in some cases I've had edges
cut off of my graphic when using this, in which case I revert to the
postscript command
- in S:
- S graphics commands ....
- >printgraph(file=file.ps,print=F,maximize=TRUE,horizontal=FALSE,width=8.5,height=11)
Chris Paciorek
2012-01-21