[R] Rotate x-axis label on log scale
Jim Lemon
jim at bitwrit.com.au
Tue Aug 24 13:47:44 CEST 2010
On 08/24/2010 11:44 AM, Tim Elwell-Sutton wrote:
> Hi
>
> I'd appreciate some help with plotting odds ratios. I want to rotate the
> labels on the x-axis by 45 degrees.
>
> The usual way of doing this, using text - e.g. text(1, par('usr')[3]-2.25..)
> - gives no result when the y-axis is a log scale.
>
> I guess this is because, as the par help says, for a logarithmic y-axis:
> y-limits will be 10 ^ par("usr")[3:4]
>
Hi Tim,
If you know where to put the labels, try:
library(plotrix)
staxlab(1,at=...,labels=...,srt=45)
Jim
More information about the R-help
mailing list