Jim Holtman wrote: > > Is this what you want? You have to reset the margins: > > png("file.png", width=200, height=200) > par(mar=c(0,0,0,0)) # reset margins > plot(0, xlim=c(0,200), ylim=c(0,200), type='n') > polygon(c(50, 50, 150, 150), c(50, 150, 150, 50)) > dev.off() > Yes and no. This sort-of does what I want, except that it has no precision! After I edit the file.png with a graphic editor, I notice that the rectangle does not have 100 x 100 pixels in the sides, because the vertices are in weird points (instead of (50,50) to (150,150), they are from (53,53) to (146,146))
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.