hin-tak.leung at cimr.cam.ac.uk
2006-Jul-10 10:58 UTC
[Rd] Unexpected difference in Bounding Box of PDF graphics between (PR#9072)
huber at ebi.ac.uk wrote:> 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) (62.253.128.15) > > > 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")) > options(width=40) > print(sessionInfo(), width=30) > sink() > > 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.[0 0 595 842] is A4 size. Probably a default taken from something.
Prof Brian Ripley
2006-Jul-10 11:44 UTC
[Rd] Unexpected difference in Bounding Box of PDF graphics between (PR#9072)
Please take great care not to start a new bug report when commenting on an old one, as you have done here. It really makes a mess of the records on the repository. (Ensure that the PR# item appears on the first line.) We do suggest quite strongly that people do not send reports on R-devel to R-bugs, as it is often `under development' as here. If you want to comment on R-devel, do make sure you are using the up-to-the-minute version, and use the R-devel list. On Mon, 10 Jul 2006, hin-tak.leung at cimr.cam.ac.uk wrote:> huber at ebi.ac.uk wrote: >> 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) (62.253.128.15) >> >> >> 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")) >> options(width=40) >> print(sessionInfo(), width=30) >> sink() >> >> 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. > > [0 0 595 842] is A4 size. Probably a default taken from something. > > ______________________________________________ > R-devel at r-project.org mailing list > https://stat.ethz.ch/mailman/listinfo/r-devel > >-- 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