This function stacks a list of grobs into a single column gtable of the given width and heights.
gtable_col(name, grobs, width = NULL, heights = NULL, z = NULL,
vp = NULL)
a string giving the name of the table. This is used to name the layout viewport
a single grob or a list of grobs
a unit vector giving the width of this column
a unit vector giving the height of each row
a numeric vector giving the order in which the grobs should be
plotted. Use Inf
(the default) to plot above or -Inf
below all existing grobs. By default positions are on the integers,
giving plenty of room to insert new grobs between existing grobs.
a grid viewport object (or NULL).
A gtable with one column and as many rows as elements in the grobs list.
Other gtable construction: gtable_matrix
,
gtable_row
, gtable_spacer
,
gtable
# NOT RUN { library(grid) a <- rectGrob(gp = gpar(fill = "red")) b <- circleGrob() c <- linesGrob() gt <- gtable_col("demo", list(a, b, c)) gt plot(gt) gtable_show_layout(gt) # }