[R] postscript problems (landscape orientation)
Prof Brian Ripley
ripley at stats.ox.ac.uk
Thu May 21 13:32:28 CEST 2009
On Thu, 21 May 2009, Zeljko Vrba wrote:
> I use the following function to export some figures to .eps:
>
> p.eps <- function(p, fname, title = NULL, width, height)
> {
> postscript(file=fname, onefile=FALSE, paper="special",
> width=width, height=height, horizontal=FALSE)
> print(p + opts(title = title))
> dev.off()
> }
>
> Whenever I have a page consisting of *only* figures exported in this way,
> Acrobat Reader shows them in landscape. If the figures are mixed with
> text, the page retains its portrait orientation.
>
> Any ideas on what's going wrong?
Using Acrobat Reader to view PostScript! It is a PDF viewer.
Acrobat Distiller has an auto-rotation option (on by default) when
converting PostScript to PDF, which ghostscript later copied. I
suspect you need to track down where conversion to PDF is happening
and disable auto-rotation.
>From ?postscript:
Note:
If you see problems with postscript output, do remember that the
problem is much more likely to be in your viewer than in R. Try
another viewer if possible.
What happened when you followed that request?
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list