[R] .ps and .pdf page size differences in FC vs. Debian

From: Clint Harshaw <charshaw_at_presby.edu>
Date: Thu 03 Mar 2005 - 05:10:43 EST


R version: 2.0.0
OS: Fedora Core 1

When I'm using Fedora Core 1, Rplots.ps (and subsequent Rplots.pdf created after using ps2pdf Rplots.ps) which are created from the command line execution of R are too large to fit on a US Letter sized page when printed. The same code will produce a US letter sized page when I'm on my Debian Sid box. Both boxes are connected to the same shared printer, and both are configured in CUPS to use US Letter paper size. When I posted a question to the FC folks, the consensus was there was a configuration that needed to be done in R to set the proper page for graphics exported.

I've google'd for a solution and came up with a check for a locale variable in /etc/sysconfig/i18n to be set to the same as for the lang variable. I tried that, and the results were still incorrectly sized.

Three sample graphs of the problem can be seen at this url:

http://penguinsolutions.org/math108/Rexamples/Rplots.pdf

Notice how the graph extends beyond the paper on the right side of each page.

The command I am running from the terminal is:

R <baseballsalary.R >output --vanilla -q

I then read about postscript() in the documentation, so I found this sequence to be successful:

> postscript("testthis.ps", paper='letter')
[...run all my same R code here...]
> dev.off()
> q()

and then run ps2pdf testthis.ps to create the plots as I intended on US letter:

http://penguinsolutions.org/math108/Rexamples/testthis.pdf

Notice that the graphs do not extend beyond the edge of US letter paper on these plots.

How do I set (in Fedora Core 1) the paper size for R to US letter, so I can run my commands R <baseballsalary.R >output --vanilla -q from the terminal?

Thanks very much,
Clint

-- 
Clint Harshaw, PhD   		Email: charshaw@presby.edu
Department of Mathematics	Ph: 864.833.8995
Presbyterian College		Fax: 864.938.3769	
Clinton, SC USA  29325		Harrington-Peachtree Rm 412

______________________________________________
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
Received on Thu Mar 03 05:51:03 2005

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:30:39 EST