[R] axis label justified

Uwe Ligges ligges at statistik.uni-dortmund.de
Fri Aug 19 08:50:57 CEST 2005


Mulholland, Tom wrote:

> I note that the axis help seems to refer to padj. After playing around it is obvious that I don't know what is meant by this argument, so maybe I'm doing something wrong. My practical soultion is

"padj" means perpendicular adjustment, that means bottom/top adjustment 
in this case.
You need the regular "adj" here, which cannot do the trick for axis(), 
but you can workaround with mtext():

  plot(1:50, yaxt="n")
  axis(2, at=1:50, labels=FALSE)
  mtext(paste('a',1:50,sep=''), 2, at=1:50, las=2,
    cex=0.5, adj=0, line=1.5)


Uwe Ligges



> plot(1:50,axes = FALSE,ylab = "")
> axis(2,at = 1:50,labels = rep("",50),las = 2,padj = 0)
> text(rep(-4,5),1:50,labels=paste('a',1:50,sep=''),xpd = TRUE,adj = 0,cex=0.5)
> 
> Tom
> 
> 
>>-----Original Message-----
>>From: r-help-bounces at stat.math.ethz.ch
>>[mailto:r-help-bounces at stat.math.ethz.ch]On Behalf Of array chip
>>Sent: Friday, 19 August 2005 7:09 AM
>>To: r-help at stat.math.ethz.ch
>>Subject: [R] axis label justified
>>
>>
>>Hi, I am trying to make my axis labels left justified,
>>and have used adj=0 in the axis() without success. Can
>>anyone have a suggestion?
>>
>>axis(2,at=1:50,labels=paste('a',1:50,sep=''),las=2,cex.axis=0.
>>5,adj=0,tck=0,mgp=c(3,0.5,0))
>>
>>Thanks
>>
>>______________________________________________
>>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
>>
> 
> 
> ______________________________________________
> 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