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, xlim=c(0, 210), ylim=c(0, 297), col="white")
  par(usr=c(0, 210, 0, 297))
  points(c(100, 100, 200, 200, 100), c(100, 200, 200, 100, 100, 100),
    type="l", col="black")
  dev.off()
 
Alberto Monteiro

______________________________________________
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
and provide commented, minimal, self-contained, reproducible code.

Reply via email to