[R] Rotation of axis labels
Sven Garbade
garbade at psy.uni-muenchen.de
Wed Jan 30 15:32:10 CET 2002
Uwe Ligges wrote:
>
> Sven Garbade wrote:
> >
> > Hi all,
> >
> > I can I rotate the x-axis labels 45 degree in clockwise direction? I`ve
> > tried
> >
> > > axis(1, ..., las=2)
> >
> > but this gives labels vertical to the axis, and las=0 or las=1 always
> > parallel axis labels.
>
> I think that's not possible with axis().
>
> One way is to use text() as in this quick hack:
>
> plot(x, y, xaxt="n")
> axis(1, labels=FALSE)
> pr <- pretty(x)
> par(xpd=TRUE)
> text(pr, par("usr")[3], pr, adj=0, srt=-90)
>
> Surely that's not perfect!
Thanks, with some modifications this works perfecly for me.
By, Sven
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !) To: r-help-request at stat.math.ethz.ch
_._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
More information about the R-help
mailing list