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

Dieter Menne dieter.menne at menne-biomed.de
Thu Jun 25 09:32:32 CEST 2009




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-tp24187351p24198429.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list