Hi Alex, is this what you want?
par(xaxs="i", yaxs="i", cex.axis=0.3) plot(1, type='n', ann=FALSE, axes=FALSE,xlim=c(0,100),ylim=c(0,100)) axis(1, at=1:100) axis(2, at=1:100) abline(h=1:100,col="grey") abline(v=1:100,col="grey") X <- sample(1:100, 10) Y <- sample(1:100, 10) rect(X,Y,X+1,Y+1,col="red") greetings, remko -- View this message in context: http://r.789695.n4.nabble.com/How-Plot-Axis-and-Rect-work-together-tp3015251p3015294.html Sent from the R help mailing list archive at Nabble.com. ______________________________________________ R-help@r-project.org 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.