[R] log scale y axis ticks control on boxplots

From: Thomas Hoffmann <thomas.hoffmann_at_uni-bonn.de>
Date: Tue 28 Feb 2006 - 09:08:10 EST


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)))



R-help@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 Received on Tue Feb 28 09:19:22 2006

This archive was generated by hypermail 2.1.8 : Fri 03 Mar 2006 - 03:42:46 EST