Rotated EPS from R in LaTeX

When it comes to figures in LaTeX, I usually generate figures in pdf format and use pdflatex to compile LaTeX with the pdf figures included. But sometimes a conference or a journal only accept figures in eps format, so I have to use EPS and the vanilla “latex” command.One problem is that I always have the EPS generated in R rotated in the resulting dvi file and I always have to use the \roatebox to correct the orientation.

Today, I reread the help file for the postscript() function in R and found the following solution:

     The postscript produced for a single R plot is EPS (_Encapsulated   PostScript_) compatible, and can be included into other documents,    e.g., into LaTeX, using ‘\includegraphics{<filename>}’.  For use in this way you will probably want to use ‘setEPS()’ to set the defaults as ‘horizontal = FALSE, onefile = FALSE, paper = “special”‘.


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 )

Google+ photo

You are commenting using your Google+ 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

%d bloggers like this: