My data is as follows:
grp = rep(1:2, each = 100)
chr = c(rep(1:10, each = 10), rep(1:10, each = 10))
var = paste (grp, "chr", chr, sep = "")
pos = (rep(1:10, 20))
yvar = rnorm(200)
mydf = data.frame (var, pos, yvar)
require( lattice)
xyplot(yvar ~ pos| factor(var), data = mydf, layout = c(1,10), type = c("g", "h"),
col = "darkolivegreen", lwd = 4)
(1) I want to put different colors to alternate graph / panel - for example - 2chr1
is darkolive green but chr10
is say purple. then again dark olive green and purple so on.
(2) I want to use reverse order of graph means that 2chr9
is at the bottom.
Thanks