Hey list, 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! Thanks a lot!! Stefan [[alternative HTML version deleted]]
Schreiber, Stefan wrote:> Hey list, > > 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! > > Thanks a lot!! > > Stefan >Hmm, are you solving the right problem there? Sounds like it would be easier to do TWO axes, one with no labels and another with no tickmarks: z<-seq(from=.5,length=10) plot(z,sin(z),xaxt="n", xlim=c(0,10)) axis(1,at=z, labels=letters[1:10], tick=F) axis(1,at=0:10, labels=F) -- O__ ---- Peter Dalgaard ?ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (p.dalgaard at biostat.ku.dk) FAX: (+45) 35327907
Schreiber, Stefan wrote:> Hey list, > > 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! > > Thanks a lot!!Plot the axes twice: once with ticks and no labels, once with labels and no ticks, e.g. plot(1:10, axes=F) axis(1, labels=F) axis(1, at = c(1,3,5,7,9), lty=0) Duncan Murdoch
> 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}}