[R] change the height or scale of the y axis

legen legendy at gmail.com
Thu Jun 25 18:42:04 CEST 2009


Hi, Dieter Menne,

Thank you for your help. I tried "par(las=1,cex=0.5)", but it changed only
the size of indices on the y axis in the second plot relative to the
default. I really want to increase the height of y axis in order to show all
the indices (x1, x2, ...). In the genetic study, we aften draw plots of
chromosomes with lots of genes (x1, x2, ...) and their positons on the
chromosome (numerical values). 

Legen



Dieter Menne wrote:
> 
> 
> 
> legen wrote:
>> 
>> 
>> I have a question about changing the height or scale of the y axis. When
>> I use following two R codes, I can get two plots. Please look at the y
>> axes, the number of indices (x1, x2, …) on the y axis in the first plot
>> is smaller than that in the second plot, and hence the space between any
>> two indices in the first plot is wider than that in the second plot. As
>> the number of indices increases, the space will vanish and the indices
>> will overlap. I want to display all the indices on the y axis in the
>> second plot, just look like that in the first plot. How to separate the
>> indices on the y axis in the second plot? I guess maybe changing the
>> height or scale of y axis is a way to solve my problem, but I failed to
>> do it after several trails. Anybody can help me? Thank you in advance.
>> 
>> 
> 
> You really put a lot of typing work into your example code, but it work,
> so it's fine. As a first attempt, put the following before the second
> plot(). 
> 
> par(las=1,cex=0.5)
> 
> And think about the paper size. I suggest to have a look at lattice
> graphics for this type of work as a more elegant alternative. And Hadley
> Wickham can certainly tell you how to do this in ggplot47
> 
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/change-the-height-or-scale-of-the-y-axis-tp24187351p24206684.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list