[R] R plot problems

Liaw, Andy andy_liaw at merck.com
Fri Oct 15 14:58:18 CEST 2004


Use text(), for which srt will work.  As an example:

plot(rnorm(20), rnorm(20), xaxt="n")
text(-2:2, rep(par("usr")[3], 5), 
     c("negative two", "negative one", "zero", "one", "two"),
     srt=45, xpd=NA, adj=1)

HTH,
Andy

> From: Henric Nilsson
> 
> At 10:51 2004-10-15 +0100, you wrote:
> 
> >If you are using base grafics, you use the argument srt (see 
> help(par)),
> 
> How do you get a, say, 45 degree rotation of the axis labels 
> using `srt'? 
> The help page for par's `las' argument says
> 
> "Note that other string/character rotation (via argument srt 
> to par) does 
> not affect the axis labels"
> 
> Henric
> 
> ______________________________________________
> R-help at stat.math.ethz.ch mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide! 
> http://www.R-project.org/posting-guide.html
> 
>




More information about the R-help mailing list