hadley/gtable — pull request #26 by wch (2012-07-13 05:33:05+00:00)
Title: Turn gtable into a grob

This is my initial attempt to turn the gtable into a grob, based on @baptiste's code.

This code uses `grid.draw()` to draw the gtable as a grob:

```
a <- gtable(unit(1:3, c("cm")), unit(5, "cm"))
a
gtable_show_layout(a)

# Add a grob:
rect <- rectGrob(gp = gpar(fill = "black"))
a <- gtable_add_grob(a, rect, 1, 1)
a <- gtable_add_grob(a, rect, 1, 3)
a

# Draw using grid
grid.newpage()
grid.draw(a)

# Can still use plot()
plot(a)
```

Input is appreciated!

@kohske, I mentioned in the other branch that I thought it was better to continue on that branch -- but here I am making a new branch. Sorry for the confusion...