Displaying 1 result from an estimated 1 matches for "xyextent".
Did you mean:
yextent
2009 Nov 24
0
problem: howto see ylim (or equivalent) within a custom panel function
...x(ncol=3)
for (i in 1:10) {
gap <- 1-runif(1)/10
pos <- 1:as.integer(lengths[i]*gap)
seq <- rep.int(i,as.integer(lengths[i]*gap))
freq <- rgamma(as.integer(lengths[i]*gap), 1)
results <- rbind(results, cbind(pos, seq, freq))
}
results <- as.data.frame(results)
panel.xyextent <- function(x, y, ...) {
panel.xyplot(x, y, ...)
panel.lines(c(0, lengths[panel.number()]), c(0,0), col="red")
}
xyplot(freq~pos | seq, layout=c(1,5,2), data=results,
panel=panel.xyextent)
I would like the hairline to be placed below the origin, by some factor
of ylim or '...