[R] zero margin / marginless plots

David Forrest drf5n at maplepark.com
Thu Jan 11 04:18:32 CET 2007


Hi,

I'd like to produce a marginless or zero margin plot so that the pixel 
coordinates represent the mathematics.

xy<-data.frame(x=c(0,1,1,0,0),y=c(0,1,0,0,1))
png('junk.png',width=300,height=300)
par(mar=c(0,0,0,0))
plot(xy$x,xy$y,xlim=c(0,1),ylim=c(,1))
dev.off()

The resultant file has about a 10 pixel margin around these lines, and I'm 
not sure what parameter or function is controlling this offset.  Any 
hints?

Thanks for your time,
Dave
-- 
  Dr. David Forrest
  drf at vims.edu                                    (804)684-7900w
  drf5n at maplepark.com                             (804)642-0662h
                                    http://maplepark.com/~drf5n/



More information about the R-help mailing list