[R] draw a 5cm x 3cm rectangle

Thomas Steiner finbref.2006 at gmail.com
Sat Oct 18 02:31:13 CEST 2008


Thanks Erik,
grid.lines() gives me exactly what I wanted.
Have a nice weekend!
Thomas


library(grid)
pdf("rect.pdf", paper="a4r")
grid.lines(x=c(1,1,3),c(1,2,2),default.units="cm")
grid.lines(x=c(1,1,3)+1,c(1,2,2)+0.5,default.units="cm",gp=gpar(col="blue"))
dev.off()



More information about the R-help mailing list