[R] Number format in log-scaled lattice xyplots

Desany, Brian brian.desany at roche.com
Sun Oct 5 19:17:10 CEST 2008


Thanks - I wasn't thinking about it the right way, and I didn't know
where to focus my investigation of the examples.

Thank you very much for pointing me at the specific example that solved
my problem.

For others who might have the same question, that would be the part of
the example that transforms the label values using 2^value, which turns
the label from something that looks like "2^3" into an actual 8.

Actually, other parts of the example are also very enlightening for
other useful things to do with tick labels.

Brian

-----Original Message-----
From: Deepayan Sarkar [mailto:deepayan.sarkar at gmail.com] 
Sent: Saturday, October 04, 2008 6:53 PM
To: Desany, Brian {454_~Branford}
Cc: r-help at r-project.org
Subject: Re: [R] Number format in log-scaled lattice xyplots

On 10/4/08, Desany, Brian <brian.desany at roche.com> wrote:
> For a non-log-scaled y-axis, I was able to change the appearance of
the
>  y tick labels in an xyplot by using a custom function for
>  yscale.components. However I couldn't get that approach to work for
when
>  scales=list(y=list(log=TRUE)).
>
>  What I'm trying to do is make the y-tick labels show up as something
>  like (10, 100, 1000, etc.) rather than the default (10^1.0, 10^2.0,
>  10^3.0, etc.).

Doesn't the first (densityplot) example in ?yscale.components.default
do this? Other relevant examples are

http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=08;figur
e=08_04

and

http://lmdvr.r-forge.r-project.org/figures/figures.html?chapter=08;figur
e=08_05

-Deepayan



More information about the R-help mailing list