Create a single row gtable.
gtable_row(name, grobs, height = NULL, widths = NULL, z = NULL, vp = NULL)
name | a string giving the name of the table. This is used to name the layout viewport |
---|---|
grobs | a single grob or a list of grobs |
height | a unit vector giving the height of this row |
widths | a unit vector giving the width of each column |
z | a numeric vector giving the order in which the grobs should be
plotted. Use |
vp | a grid viewport object (or NULL). |
library(grid) a <- rectGrob(gp = gpar(fill = "red")) b <- circleGrob() c <- linesGrob() gt <- gtable_row("demo", list(a, b, c)) gt#> TableGrob (1 x 3) "demo": 3 grobs #> z cells name grob #> 1 1 (1-1,1-1) demo rect[GRID.rect.111] #> 2 2 (1-1,2-2) demo circle[GRID.circle.112] #> 3 3 (1-1,3-3) demo lines[GRID.lines.113]plot(gt)