[R] overlap different line in a xyplot (lattice)

Peter Ehlers ehlers at ucalgary.ca
Mon Dec 13 15:05:32 CET 2010


On 2010-12-13 03:13, Francesco Nutini wrote:
>
>  > From: felix at nfrac.org

[...snip...]

>  >
>  > xyplot(y1 + y2 ~ x | sites, DF, type = "b")
>
>
> Great Felix! this is what I was looking for!
> But if y1 and y2 have a different scales? Can I plot, for example y2, on
> secondary axis?

There are probably good reasons why you should not
do this, but one way is to use doubleYScale() in the
latticeExtra package.

Peter Ehlers

>
> Thanks for your help,
>
> Francesco Nutini

[...snip...]



More information about the R-help mailing list