Re: [R] pdf with an exact size

2007-02-24 Thread Renaud Lancelot
The package grid provides very convenient tools for such things: library(grid) pdf(file = square.pdf, paper = a4) pushViewport(viewport()) grid.rect(width = 100, height = 100, default.units = mm) dev.off() works just fine for me (R 2.4.1, MS WIndows XP): the printed output on my inkjet printer

[R] pdf with an exact size

2007-02-23 Thread Alberto Monteiro
Is it possible to create a pdf output file with an (as nearly as possible) exact size? For example, if I want to draw in an A4 paper (210 x 297 mm) a square of 100 x 100 mm, how can I do it? FWIW, about 6 months ago I learned here how to create an exact png image. For example, if I want a 500 x

Re: [R] pdf with an exact size

2007-02-23 Thread Alberto Monteiro
I must be stupid and/or crazy... I figured out the solution a few minutes after I asked :-/ Is it possible to create a pdf output file with an (as nearly as possible) exact size? Yes: pdf(a4.pdf, width=210, height=297, bg=white, paper=a4) par(mar=c(0,0,0,0)) # reset margins plot(0,

Re: [R] pdf with an exact size

2007-02-23 Thread Joerg van den Hoff
On Fri, Feb 23, 2007 at 04:24:54PM -0200, Alberto Monteiro wrote: Is it possible to create a pdf output file with an (as nearly as possible) exact size? For example, if I want to draw in an A4 paper (210 x 297 mm) a square of 100 x 100 mm, how can I do it? FWIW, about 6 months ago I