On Sat, Nov 6, 2010 at 3:02 PM, Marc Paterno <[email protected]> wrote:
> Hello,
>
> I am trying to alter the way in which lattice functions (specifically xyplot) 
> print the axis labels when one uses the 'scales' parameter.
> I can obtain the effect I want by using
>  scales=list(y=list(log=10, labels=expression(yvalues)))
> where yvalues are the values that would have been printed as the y-axis 
> labels if the "labels" argument had not been present. To help clarify what I 
> am looking for, compare the first of the following plots with the second:
>
> data(iris)
> xyplot(Sepal.Length~Sepal.Width, iris, scales=list(y=list(log=10)))
>
> xyplot(Sepal.Length~Sepal.Width, iris, scales=list(y=list(log=10, 
> labels=expression(10^0.65,10^0.7,10^0.75,10^0.8,10^0.85,10^0.85,10^0.9))))
>
> The second is the effect I am trying to achieve. Is there a way to do this 
> without explicitly entering the expressions to be printed on the y-axis?
>

Try:

library(latticeExtra)
xyplot(Sepal.Length~Sepal.Width, iris, scales=list(y=list(log=10)),
   yscale.components = yscale.components.logpower)


-- 
Statistics & Software Consulting
GKX Group, GKX Associates Inc.
tel: 1-877-GKX-GROUP
email: ggrothendieck at gmail.com

______________________________________________
[email protected] 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.

Reply via email to