gtable_add_padding | R Documentation |
This is a convenience function for adding an extra row and an extra column at each edge of the table.
gtable_add_padding(x, padding)
x |
a |
padding |
vector of length 4: top, right, bottom, left. Normal recycling rules apply. |
A gtable object
Other gtable manipulation:
gtable_add_cols()
,
gtable_add_grob()
,
gtable_add_rows()
,
gtable_add_space
,
gtable_filter()
library(grid)
gt <- gtable(unit(1, "null"), unit(1, "null"))
gt <- gtable_add_grob(gt, rectGrob(gp = gpar(fill = "black")), 1, 1)
plot(gt)
plot(cbind(gt, gt))
plot(rbind(gt, gt))
pad <- gtable_add_padding(gt, unit(1, "cm"))
plot(pad)
plot(cbind(pad, pad))
plot(rbind(pad, pad))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.