Hi list,
This is a very basic question about lattice: I wish to add some
vertical lines in each panel of a xyplot as demonstrated in this
example:
library(lattice)
xx - seq(1, 10, length=100)
x - rep(xx, 4)
y - c(cos(xx), sin(xx), xx, xx^2/10)
fact - factor(rep(c(cos, sin, id, square),
On Thu, Aug 7, 2008 at 11:54 AM, baptiste auguie [EMAIL PROTECTED] wrote:
Hi list,
This is a very basic question about lattice: I wish to add some vertical
lines in each panel of a xyplot as demonstrated in this example:
library(lattice)
xx - seq(1, 10, length=100)
x - rep(xx, 4)
y -
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
Many thanks Deepayan, it works nicely (i always need simple examples
to understand the help page for some reason).
Also, Hadley, I can't get this example from ggplot2's website to work:
# Slopes and intercepts as data
p - ggplot(mtcars, aes(x = wt, y=mpg), . ~ cyl) + geom_point()
df
4 matches
Mail list logo