Skip to content

orientation of eps files

6 messages · Andrew Collier, Roger D. Peng, Brian Ripley +2 more

#
hello,

i have a problem with the orientation of eps files produced with the postscript() command. i have generated some eps files with R using:

postscript(file = filename, horizontal = FALSE, paper = "special", onefile = F
ALSE, height = height, width = width, pointsize = pointsize)

now, when i include these eps files into a standard paper document (ie. a4 paper, portrait orientation) everything is fine.

however, i am now wanting to incorporate the same images into a presentation. i am making a pdf file, which for presentation purposes is in landscape orientation. i am using latex with the prosper package. images are included with \includegraphics{} and a pdf file is generated with dvipdf. however, in this case, when i include the eps figures the whole page suddenly gets rotated around into portrait. eps files from other packages seem to work fine.

there is an example of the problem at ftp://chinstrap.nu.ac.za/orientation.pdf.

if you have any ideas as to what might be causing this problem, i would be extremely happy to hear them.

best regards,
andrew.
#
On Wed, 2005-03-02 at 15:44 +0200, Andrew Collier wrote:
My recollection is that it is impacted upon by your setting of the
height and width arguments.

I have used the seminar package for creating slides with embedded EPS
files from R. Using the standard U.S. "letter" size paper, I have:

   postscript(..., width = 9.5, height = 7.5, ...)

This leaves 1 inch margins on the right and left sides of the page and
half inch margins on the top and bottom.

I don't recall the specifics, but if I went much larger than the above
settings, the landscape page would get rotated to portrait.

In the LaTeX code, I then have:

\begin{slide}
  \begin{center}
    \includegraphics[width=0.9\textwidth]{FileName.eps}
  \end{center}
\end{slide}

The above seems to work in the seminar package and I believe that
prosper is built upon the former. Note the 'width' setting.

You will likely need to make comparable adjustments using the 'a4' page
size in order to maintain a landscape orientation.

HTH,

Marc Schwartz
#
This is ghostscript feature, I believe.  See here:

https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027759.html

I usually do

setenv GS_OPTIONS "-dAutoRotatePages=/None"

in tcsh.

-roger
Andrew Collier wrote:

  
    
#
Yes, and it happens because by default R's plots have rotated text on the 
y axis, and it is this that tends to trigger auto-rotation.

The answer is in

https://www.stat.math.ethz.ch/pipermail/r-devel/2003-October/027766.html

various other items in the thread being off the point.
On Wed, 2 Mar 2005, Roger D. Peng wrote:

            

  
    
#
I also had problems with the rotation of eps files in LaTeX presentations. 
Now, I produce eps files in R with postscript( ), 'distill' it with "ps2eps", 
make a pdf with "epstopdf", include it in my LaTeX file with \pgfimage{ },
use LaTeX class "beamer" (http://latex-beamer.sourceforge.net) and compile my 
presentation with pdflatex. This works great!

HTH,
Arne
On Wednesday 02 March 2005 14:44, Andrew Collier wrote:

  
    
#
On Wed, 2005-03-02 at 17:02 +0000, Prof Brian Ripley wrote:
Thanks to both of you for that clarification on this. It is curious that
I was able to restrict this behavior seemingly by adjusting the size of
the plot and the margins on the slide page when this behavior occurred.
Presumably those changes masked this underlying issue.

As an FYI, for those using the bash shell (typical for many Linuxen),
the commands would be:

GS_OPTIONS="-dAutoRotatePages=/None"
export GS_OPTIONS

or they can be combined in a single command:

export GS_OPTIONS="-dAutoRotatePages=/None"

which can be placed in a shell script or in ~/.bash_profile, which makes
the change "global" for the login session.

Thanks,

Marc