[R] Vertical text in plot

Marc Schwartz MSchwartz at MedAnalytics.com
Fri Jul 2 19:52:28 CEST 2004


On Fri, 2004-07-02 at 12:45, Wolski wrote:
> Hallo!
> Would like to add vertical text labels to a histogram. Was trying with las but without sucess.
> I am using the standard histogram.
> This is what I was trying.
> 
> hist(resS2$sam,breaks=seq(0,1,0.01),col=3,border=0,freq=F,add=T,xlim=c(0,1))
> text(quantile(resS2$dif,0.005),5, "0.5% FP rate" ,pos=2,cex=0.6,las=2)
> 
> Thanks in advance.
> Eryk


Hi Eryk!

Try using 'srt' instead of 'las', which is for the axis labels.

For example:

text(quantile(resS2$dif, 0.005), 5, "0.5% FP rate", 
     pos = 2, cex = 0.6, srt = 90)

See ?par for more information.

HTH,

Marc Schwartz




More information about the R-help mailing list