Displaying 2 results from an estimated 2 matches for "addgrob".
Did you mean:
  addglob
  
2009 Sep 27
0
puzzle with drawDetails for a class derived from a gTree
...ot;test")
  if(draw)
    grid.draw(x)
  invisible(x)
}
drawDetails.test <- function(x, recording=TRUE) {
  x <- applyEdits(x,  x$edits)
## create the two grobs
  left <- make.test.left(x$left, x$col)
  right <- make.test.right(x$right, x$col)
## add them to the gTree
  x <- addGrob(x, right)
  x <- addGrob(x, left)
## borrowed from grid.xaxis
## draw the children only
  for(child in childNames(x))
    grid.draw(getGrob(x, child))
}
grid.test("a", "b", edits=gEdit(left="left text", col="blue"),  name="test")
# works as e...
2006 Jul 29
3
placing rectangle behind plot
I am trying to create a lattice plot and would like to later, i.e. after
the plot is drawn, add a grey rectangle behind a portion of it.
The following works except that the rectrangle is on top of and
obscures a portion of the chart.  I also tried adding col = "transparent"
to the gpar list but that did not help -- I am on windows and
perhaps the windows device does not support