Displaying 1 result from an estimated 1 matches for "keygrob".
Did you mean:
keyfob
2008 Dec 02
1
legend idea for latticeExtra
...=c("a", "b"),
unit="npc",
pch=1, lty=NULL, col=seq_along(text), cex=0.6,
cex.title=0.8, ...){
if(loc) {
ll <- grid.locator(unit)
print(ll)
x <- as.numeric(ll$x)
y <- as.numeric(ll$y)
}
lines <- !is.null(lty)
points <- !is.null(pch)
keyGrob <- draw.key(key=simpleKey(text, lines=lines,
points = points,cex=cex, cex.title=cex.title, ...),
vp=viewport(x=unit(x, unit), y=unit(y, unit)), draw=F)
grid.draw(keyGrob)
invisible(keyGrob)
}
# example (locator used for the second legend)
xyplot(1~1)
llegend()
llegend(loc=T, titl...