[R] scatter plot with axes drawn on the same scale

bogdan romocea br44114 at gmail.com
Fri Jul 28 22:35:34 CEST 2006


Dear useRs,

I'd like to produce some scatter plots where N units on the X axis are
equal to N units on the Y axis (as measured with a ruler, on screen or
paper). This approach
  x <- sample(10:200,40) ; y <- sample(20:100,40)
  windows(width=max(x),height=max(y))
  plot(x,y)
is better than plot(x,y) but doesn't solve the problem because of the
other parameters (margins etc). Is there an easy, official way of
sizing the axes to the same scale, one that would also work with
multiple scatter plots being sent to the same pdf() - plus perhaps
layout() or par(mfrow())?

Thank you,
b.



More information about the R-help mailing list