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)
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
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
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)
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
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