View source: R/gtable-layouts.R
gtable_row | R Documentation |
This function puts grobs in a list side-by-side in a single-row gtable from left to right witrh the given widths and height.
gtable_row(
name,
grobs,
height = NULL,
widths = NULL,
z = NULL,
vp = NULL,
clip = "inherit"
)
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). |
clip |
should drawing be clipped to the specified cells
( |
A gtable with a single row and the same number of columns as elements in the grobs list
Other gtable construction:
gtable()
,
gtable_col()
,
gtable_matrix()
,
gtable_spacer
library(grid)
a <- rectGrob(gp = gpar(fill = "red"))
b <- circleGrob()
c <- linesGrob()
gt <- gtable_row("demo", list(a, b, c))
gt
plot(gt)
gtable_show_layout(gt)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.