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. -- Andrew B. Collier Antarctic Research Fellow tel: +27 31 2601157 Space Physics Research Institute fax: +27 31 2616550 University of KwaZulu-Natal, Durban, 4041, South Africa
On Wed, 2005-03-02 at 15:44 +0200, Andrew Collier wrote:> 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.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:> 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. >-- Roger D. Peng http://www.biostat.jhsph.edu/~rpeng/
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:> 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.-- Arne Henningsen Department of Agricultural Economics University of Kiel Olshausenstr. 40 D-24098 Kiel (Germany) Tel: +49-431-880 4445 Fax: +49-431-880 1397 ahenningsen at agric-econ.uni-kiel.de http://www.uni-kiel.de/agrarpol/ahenningsen/