[R] Prettier axis labels when using log (or exp!!) scales in Lattice (follow up)
ottorino-luca.pantani at unifi.it
Tue Jul 5 15:01:48 CEST 2011
my mail is a follow up of this thread
I'm trying to alter the labels of an xyplot where the y variable is in
the order of millions (cell counts)
I've found plenty of examples on the R mailing list archives as well as
in the book
Lattice: Multivariate Data Visualization with R
at chapter 8.
Unfortunately all the examples refers to log transformation of data, but
actually what I'm looking for is exactly the reverse (exp).
An example would better show what I'm looking for.
xyplot(Sepal.Length*10e3 ~ Sepal.Width, iris)
If the figures are higher, the format of the labels also changes
xyplot(Sepal.Length*10e12 ~ Sepal.Width, iris)
The y axis of the above plot is what I'm currently get with my data
I would like the y axis in the form 50^3 .
I would better say I want the y axis labels in the form
I know from ?xyplot that the argument scales accept "log",
and "that this is in reality a transformation of the data, not the
So the plot I would like to get is similar to
xyplot(Sepal.Length*10e3 ~ Sepal.Width, iris,
yscale.components = yscale.components.logpower)
but without transforming the variables
In summary I would like to be able to use some sort of exp(10) instead
Any suggestion to accomplish this?
Thanks in advance
More information about the R-help