On Sun, Feb 7, 2010 at 11:32 AM, Jacob Wegelin <jacobwege...@fastmail.fm> wrote:
>
> The example below creates parallel time-series plots of three different y
> variables conditioned by a dichotomous factor. In the graphical layout,
>
>        •       Each y variable inhabits its own row and is plotted on its
> own distinct scale.
>
>        •       Each level of the factor has its own column, but within each
> row the scale is held constant across columns.
>
>        •       The panels fit tightly (as they do in lattice) without
> superfluous whitespace or ticks.
>
> Currently I know of no lattice solution to this problem, only a traditional
> graphics solution. Can one solve this problem elegantly using lattice?

It's easy with ggplot2:

library(ggplot2)
JUNKm <- melt(JUNK, measure = c("ppp", "QQQ", "z"))

ggplot(JUNKm, aes(TIME, value, group = ID)) +
  geom_line() +
  geom_point() +
  facet_grid(variable ~ Species, scales = "free_y") +
  scale_y_log10()

Hadley

-- 
http://had.co.nz/

______________________________________________
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.

Reply via email to