[R] log scale y axis ticks control on boxplots

Thomas Hoffmann thomas.hoffmann at uni-bonn.de
Mon Feb 27 23:08:10 CET 2006


Hey R Users

I like to control the ticks and labels in a boxplot as described for a 
xyplot below (thread in maillinglist in may 2003). Does anybody knows 
how it works?

Thanks in advance
Thomas

Thread from May 2003
(http://tolstoy.newcastle.edu.au/R/help/03a/5604.html)

Hello R Users!

I'm using lattice to produce some graphs with logaritmic y-scales. I use
the command

xyplot(hits ~ c(1:1024), data=eichData, type="S", scales=list(y =
list(log=10)))

to create the plot. This is fine, except for the automatically choosen
tick marks. I'd like to have a major tick at the 10^n location and minor
ticks in between which correspond with the native variable. To get this
working I have to use at and label like

labl <- rep("", 30)
labl[1] <- "1"; labl[10] <- "10"; labl[19] <- "100"; labl[28] <- "1000";
nums <- c(1:10, seq(20,100, 10), seq(200, 1000, 100))
xyplot(hits ~ c(1:1024), data=eichData, type="S", scales=list(y =
list(log=10, at=nums, labels=labl)))




More information about the R-help mailing list