[R] Proportional axes
Agustin Lobo
Agustin.Lobo at ija.csic.es
Wed May 21 11:12:58 CEST 2008
Thanks, I looked
into the man pages of par() and
did not into the ones of plot()
Sorry about it,
Agus
Richard Rowe escribió:
> plot(runif(10,0,10),runif(10,10,30),xlim=c(0,10),ylim=c(10,30), asp=1)
> asp is the aspect parameter and ensures x & y metrics are the same (try
> the plot without it).
>
> To save more space you will need to inform the plotting system you want
> a portrait perspective plot and control the size of the canvas. You can
> also drag the handles of the plot as the asp = 1 will maintain the
> metric relationship ... and rely on Brian Ripley's graphics drivers to
> deliver the information you want into a form you can incorporate elsewhere,
>
> Richard
>
>
> Agustin Lobo wrote:
>> 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
>>
>
>
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: Agustin.Lobo at ija.csic.es
http://www.ija.csic.es/gt/obster
More information about the R-help
mailing list