[Rd] Unexpected difference in Bounding Box of PDF graphics between 2.3.1p and 2.4 (PR#9070)

From: <huber_at_ebi.ac.uk>
Date: Sun 09 Jul 2006 - 21:04:29 GMT

Full_Name: Wolfgang Huber
Version: R version 2.4.0 Under development (unstable) (2006-07-09 r38523) OS: i686-pc-linux-gnu
Submission from: (NULL) (

There appears to be unintentional behaviour in the size of the bounding box for PDF graphics produced with the current R2.4, compared to 2.3.1. I posted two PDF files, both produced with the same R script below, but different versions of R: http://www.ebi.ac.uk/~huber/pub

The code is here:

pdf(file=sprintf("test-%s.pdf", version$"svn rev"), width=4, height=4) par(mai=par("mai")[rep(1:2,2)])
x = seq(0, 10*pi, length=3000)
plot(x*cbind(sin(x),cos(x)), type="l", col="mistyrose", lwd=3)

sink(textConnection("s", "w"))
print(sessionInfo(), width=30)

text(-30, 30-4*seq(along=s), s, adj=c(0,0.5), cex=0.7) dev.off()

and one of the differences between the resulting PDF files is: test-38323.pdf: /MediaBox [0 0 288 288]
test-38523.pdf: /MediaBox [0 0 595 841]

The former corresponds to 4x4 inches, the latter to 21cm x 29.67cm.

R-devel@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-devel Received on Mon Jul 10 07:07:23 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Mon 10 Jul 2006 - 12:25:55 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.