[R] rotate bar labels in barplot()

[Ricardo Rodriguez] Your XEN ICT Team webmaster at xen.net
Thu Apr 3 03:07:56 CEST 2008

Thanks Peter,

Peter Alspach wrote:
> Ricardo
> The las argument will allow rotation of 90 degrees:
> par(mfrow=c(2,2))
> barplot(1:10, names=letters[1:10], las=0)
> barplot(1:10, names=letters[1:10], las=1)
> barplot(1:10, names=letters[1:10], las=2)
> barplot(1:10, names=letters[1:10], las=3)
> If you want to do other rotation angles then it will be more complicated (but not much).

90ª will be OK. But I am afraid I will have to move to axis() anyway. 
Look at this...


It seems there is not enough room for labels. Even those that are short 
enough aren't always displayed. If I use letters, they do just fine. 
Could I control this space? I am afraid that I don't understand this ... 
at the bottom of the arguments list in ?barplot or any other R function :-(

Thank you so much for your help,


Ricardo Rodríguez
Your XEN ICT Team

More information about the R-help mailing list