search for: plot_grob_matrix

Displaying 1 result from an estimated 1 matches for "plot_grob_matrix".

2005 Nov 02
0
Placing a grob in multiple viewports
Hi all, What's the best way of placing a grob into muliple viewports? I've been using code like: plot_grob_matrix <- function(gm, type=deparse(substitute(gm))) { grid <- expand.grid(x=1:nrow(gm), y=1:ncol(gm)) do.call(gList,mapply(function(x,y) editGrob(gm[[x,y]], vp=vp_path(x, y, type)), grid$x, grid$y, SIMPLIFY=FALSE)) } vp_path <- function(row, col, type) { vpPath("layout", paste(typ...