How to output an eps figure in R

If you are executing a plot command in a R script it should default to generating a pdf document with your plot.  This is really cool because you don’t really have to think about how to show what you have calculated in your script.  But when you need a different output format you must use the postscript command.

Here is a quick example of how I used it to create an eps image to embed in a latex document:

postscript(file="plot.eps", onefile=FALSE, horizontal=FALSE)

Though the postscript command has lots of arguments, I only used the horizontal to make sure that the image was in a vertical position.


About joelgranados

I'm fascinated with how technology and science impact our reality and am drawn to leverage them in order to increase the potential of human activity.
This entry was posted in commands, PhD, R. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s