Displaying 1 result from an estimated 1 matches for "latticegrob".
2010 Mar 19
2
lattice grob
...ot2 objects using the ggplotGrob() function. I am
however stuck with lattice. As far as I understand, lattice produces a
list of class trellis, which is eventually displayed using the
plot.trellis method. I am not sure if/how one can convert this list
into a high-level grob. I tried the following,
latticeGrob <- function(p, ...){
grob(p=p, ..., cl="lattice")
}
drawDetails.lattice <- function(x, recording=FALSE){
lattice:::plot.trellis(x$p)
}
p1 <- xyplot(1:10 ~ 1:10)
g1 <- latticeGrob(p1)
grid.draw(g1) # works fine
but,
fg <- frameGrob(layout = grid.layout(1,1))
fg <...