Export a graph to .eps file with R

the_drug picture the_drug · Feb 28, 2011 · Viewed 120.1k times · Source

How do I export a graph to an .eps format file? I typically export my graphs to a .pdf file (using the 'pdf' function), and it works quite well. However, now I have to export to .eps files.

Answer

CompEcon picture CompEcon · Nov 16, 2011

The easiest way I've found to create postscripts is the following, using the setEPS() command:

setEPS()
postscript("whatever.eps")
plot(rnorm(100), main="Hey Some Data")
dev.off()