This (and William's solution) is so good, I must ask: Is there a good reason why this is not the default functionality in the graphics package?
The default displays the number 1 as 1+e00 which is hideous! -----Original Message----- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Martin Maechler Sent: Saturday, 23 June 2012 4:57a To: Luigi; William Dunlap Cc: r-help@r-project.org Subject: Re: [R] Boxplot with Log10 and base-exponent axis > The key is to supply an expression, not text, to the labels argument to axis. > See help("plotmath") for details. Here is an example: > x <- list(One=10^(sin(1:10)+5), Two=10^(cos(1:30)*2)) > boxplot(x, log="y", yaxt="n") > ylim <- par("usr")[3:4] > log10AtY <- seq(ceiling(ylim[1]), floor(ylim[2])) > axis(side=2, at=10^log10AtY, lab=as.expression(lapply(log10AtY, > function(y)bquote(10^.(y))))) Yes, that's nice, and exactly the basic idea. For a few years now, the eaxis() function in package "sfsmisc" does (something like) this (and a bit more) even more nicely : install.packages("sfsmisc") require("sfsmisc") x <- list(One=10^(sin(1:10)+5), Two=10^(cos(1:30)*2)) boxplot(x, log="y", yaxt="n") eaxis(2) -- Martin Maechler, ETH Zurich ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.