[R] Landscape problems with ps2pdf

Matthew Nelson mnelson at esperion.com
Fri Dec 1 16:35:55 CET 2000


> -----Original Message-----
> From: Douglas Bates [mailto:bates at stat.wisc.edu]
> 
> Prof Brian D Ripley <ripley at stats.ox.ac.uk> writes:
> 
> > On Thu, 30 Nov 2000, Matthew Nelson wrote:
> > 
> > > R Users,
> > > 
> > > I have created a multipage PostScript file using the 
> postscript() function
> > > with horizontal = TRUE to produce my plots in landscape.  
> I intended to
> > > convert that entire file to PDF using ps2pdf to have the 
> plots available for
> > > a presentation.  Unfortunately, the resulting PDF 
> document is rotated -90
> > > degrees.
> > 
> > Um, I think the problem is that the PDF document is rotated (as it
should
> > be), but the reader is not being told to display it rotated to
landscape.
> > That's ps2pdf's failing, nor R's, as Adobe Distiller does this as you
> > intended with R plot files.
> 
> I encountered a similar problem when producing landscape slides with
> LaTeX and dvips, then converting to PDF with ps2pdf.  (There are
> reasons for not using pdflatex to go directly to PDF in this case.)
> Saikat DebRoy discovered a fix for this somewhere on the Ghostscript
> web site - I believe through searching at google.org first.
> 
> The fix is to edit the dvips-produced PostScript file by hand and
> replace a single line of @landscape by an explicit setpagedevice.
> Perhaps adding a setpagedevice in the Prolog for the R plots will do
> the same - I haven't tried this.  The Setup section in the PostScript
> produced by dvips is modified to be (the numbers 792 and 612 are the
> page sizes for US-letter paper in PostScript points or 1/72 inch)
> 
> %%BeginSetup
> %%Feature: *Resolution 83dpi
> TeXDict begin
>   % @landscape
>   << /PageSize [792 612] /Orientation 0 >> setpagedevice
> %%EndSetup

I had actually come across this suggestion in my search.  It worked
perfectly on the LaTeX generated portion of my presentation.  However, I
can't find any such setup in the R-generated PostScript files.  I followed
Professor Ripley's advice and just used Adobe Distiller, which worked fine.
If I find some other ghostscript or Linux based workaround, I'll be sure to
post it to this list.

Regards,

Matt Nelson 
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._



More information about the R-help mailing list