RE: [R] asp=1 and aspect ratio

2004-03-19 Thread Liaw, Andy
Try par(pty=s). HTH, Andy From: Robin Hankin Hi everyone I want a square scatterplot with abline(0,1) going exactly through the SW and NE corners. By square I mean that the plotting region is exactly square, and that the axis limits are identical. x - 1:20 y - x+rep(c(-1,1),10)

Re: [R] asp=1 and aspect ratio

2004-03-19 Thread Sundar Dorai-Raj
Robin Hankin wrote: Hi everyone I want a square scatterplot with abline(0,1) going exactly through the SW and NE corners. By square I mean that the plotting region is exactly square, and that the axis limits are identical. x - 1:20 y - x+rep(c(-1,1),10) lims - range(c(x,y)) None of the

Re: [R] asp=1 and aspect ratio

2004-03-19 Thread Spencer Graves
plot(x,y,asp=1, axes=F, bty=n);abline(0,1) #diagonal line misses corners axis(2, pos=0) axis(1, pos=0) hope this helps. spencer graves Robin Hankin wrote: Hi everyone I want a square scatterplot with abline(0,1) going exactly through the SW and NE corners. By square I mean that the

Re: [R] asp=1 and aspect ratio

2004-03-19 Thread Marc Schwartz
On Fri, 2004-03-19 at 09:06, Robin Hankin wrote: Hi everyone I want a square scatterplot with abline(0,1) going exactly through the SW and NE corners. By square I mean that the plotting region is exactly square, and that the axis limits are identical. x - 1:20 y - x+rep(c(-1,1),10)

Re: [R] asp=1 and aspect ratio

2004-03-19 Thread Prof Brian Ripley
par(pty=s) is designed to set square plotting regions. (That is in `An Introduction to R', as well as used frequently in MASS.) plot(0:21, 0:21, type=n, xlab=x, ylab=x) points(x,y) abline(0,1) is one way to do it thereafter, as well as plot(x,y,xlim=lims,ylim=lims);abline(0,1) On Fri, 19

Re: [R] asp=1 and aspect ratio

2004-03-19 Thread Marc Schwartz
On Fri, 2004-03-19 at 09:29, Marc Schwartz wrote: On Fri, 2004-03-19 at 09:06, Robin Hankin wrote: Hi everyone I want a square scatterplot with abline(0,1) going exactly through the SW and NE corners. By square I mean that the plotting region is exactly square, and that the axis