Skip to content

Label justification (axis) (PR#13307)

3 messages · martin.bader at unibas.ch, Brian Ripley, Kjell Konis

#
Full_Name: Martin Karl-Friedrich Bader
Version: 2.8.0
OS: 10.5.3
Submission from: (NULL) (131.152.1.1)


Hi there,

when using las=1 on the y-axis the labels keep their centered justification,
e.g. if you plot a graph using the axis command: axis(side=2, at=c(0,50, 100,
125), lab=c("0","50","100", " "), las=1), then the 0 and the 50 are centered in
relation to the 100! One can work around that problem by inserting blank spaces
in front of the lower numbers (e.g.: "     0") but that's not an appropriate
solution! Is there a way that can be fixed? Thanks in advance!

Martin
#
Can you please provide a complete reproducible example, including the 
device used. E.g.

quartz() # or X11()
plot(1:200, yaxt="n", type="n")
axis(side=2, at=c(0,50,100,125), lab=c("0","50","100"," "), las=1)

does not work as you describe (R 2.8.0 in R.app, Mac OS 10.5.5).
On Thu, 20 Nov 2008, martin.bader at unibas.ch wrote:

            
Is that Solaris or SuSE or HP-UX or Mac OS?

As only Windows and Mac users seem to be in denial about there being any 
other OS, I suspect we can infer ....

  
    
#
If you want to change the orientation of the axis labels you use las.  
If you want to change the horizontal justification of the axis labels  
you use hadj. If you want to change the orientation of the axis labels  
and the horizontal justification of the axis labels then you use las  
and hadj at the same time.
On 20 nov. 08, at 14:45, martin.bader at unibas.ch wrote: