Hello everyone, I am trying to understand how plot axis and rect might work together I would like to plot some values on a plot with x(0,100) and y(0,100) i want to see all the values from 0,1,2,3,4,5,.....100 written in the x and y axis. At the same time I want some grid to easily see when y and x values cross. Finally I want to paint red two of the cells created by this grid. I am trying some time now to do all these three work together. I found the functions axis grid rect and plot.. but I am not sure how to make all them work together. It seems that plots internally calls grid and axis but not sure. Could you please shed some light on this? I would like to thank you in advance for your help Regards Alex [[alternative HTML version deleted]]
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.