[R] lattice: add vertical lines in xyplot
hadley wickham
h.wickham at gmail.com
Thu Aug 7 22:06:18 CEST 2008
> Alternatively, I tried in ggplot but here again, I get an error:
>
>> p <- ggplot(my.df, aes(x, y)) +
>> geom_path(aes(colour = fact)) +
>> facet_grid(fact2 ~ fact) +
>> geom_vline(intercept = my.lines) # how do I select the
>> relevant one ?
If you want a different line in each panel, you'll need to construct a
data frame - see the example at
http://had.co.nz/ggplot2/geom_abline.html for the basic idea.
Hadley
--
http://had.co.nz/
More information about the R-help
mailing list