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

From: Sundar Dorai-Raj <sundar.dorai-raj_at_pdf.com>
Date: Sat 29 Jul 2006 - 06:46:04 EST

Try:

plot(x, y, asp = 1)

--sundar

bogdan romocea wrote:
> 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.
>
> ______________________________________________
> R-help@stat.math.ethz.ch 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.



R-help@stat.math.ethz.ch 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. Received on Sat Jul 29 06:50:56 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Sat 29 Jul 2006 - 10:16:56 EST.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.