[R] Proportional axes

Ivar Herfindal ivar.herfindal at bio.ntnu.no
Wed May 21 11:27:47 CEST 2008


Hello.

Try the to set asp=1 (aspect ratio between y- and x-axis):

plot(runif(10, 0, 10), runif(10, 10, 30), asp=1)

Best

Ivar Herfindal


Agustin Lobo skrev:
> Hi!
>
> If I'm plotting 2 variables with the same units
> (i.e. wing length of 2 species), how can I force that X
> and Y axes have the same size for length unit? For example, if
> X ranges from 0 to 10 and Y ranges from 10 to 30, I want
> Y axis to be twice as long as X axis. I know I can just
> put xlim and ylim from 0 to 30, i.e.,
> plot(runif(10,0,10),runif(10,10,30),xlim=c(0,30),ylim=c(0,30))
>
> but this is a waste of space.
>
> Thanks
>



More information about the R-help mailing list