[R] axis label justified
Prof Brian Ripley
ripley at stats.ox.ac.uk
Fri Aug 19 09:02:12 CEST 2005
On Fri, 19 Aug 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
It moves in the other direction: for the standard x-axis it moves strings
up or down. Compare
> axis(1, at = seq(10,50,10), padj=0)
> axis(1, at = seq(10,50,10), padj=1)
axis() overrides any setting of par(adj).
I am not entirely sure why: my guess is that this is to avoid it being
picked up when it was intended for something else like text. Certainly
sensible values would be axis- and orientation- specific so the global
setting for the device needs to be ignored, but why any setting in the
call should be is less clear. Maybe the thing to do is to introduce an
argument like 'hadj'.
> 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
>
--
Brian D. Ripley, ripley at stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272866 (PA)
Oxford OX1 3TG, UK Fax: +44 1865 272595
More information about the R-help
mailing list