Displaying 1 result from an estimated 1 matches for "makeonelabel".
2009 Sep 19
1
matrix operations on grobs and grid units
...cex=1),
gpar.fill = gpar(fill = "grey95", col="white", lwd=1.5)) {
n <- length(e) # number of labels
stopifnot(!n%%2) # only rectangular layouts
if(missing(ncol) & missing(nrow)){
nm <- n2mfrow(n) # pretty default layout
ncol = nm[1]
nrow = nm[2]
}
makeOneLabel <- function(label.ind){
textGrob(label=e[label.ind], gp=gpar.text,
name=paste("cells-label-",label.ind, sep=""))
}
lg <- lapply(seq_along(e), makeOneLabel) # list of grobs
wg <- lapply(lg, grobWidth) # list of grob widths
hg <- lapply(lg, grobHeight) # list of grob...