[R] shifting ticks to left or right

Richard.Cotton at hsl.gov.uk Richard.Cotton at hsl.gov.uk
Wed Oct 1 18:52:15 CEST 2008


> Does anybody knows a command to centre the tick mark labels exactly
> between the tick points (right shift)?
> And then to exclude the last tick label on  the right?
> 
> I know one can shift them using the 'hadj' option in par. But I am
> wondering if there is a more convenient command!

A little nasty, but:

plot(1:10, axes=FALSE)
par(tcl=-0.5)
Axis(side=1, at=c(1,5,9), labels=rep("",3))
par(tcl=0)
Axis(side=1, at=c(3,7), labels=c("foo", "bar"))

Regards,
Richie.

Mathematical Sciences Unit
HSL


------------------------------------------------------------------------
ATTENTION:

This message contains privileged and confidential inform...{{dropped:20}}



More information about the R-help mailing list