Description Usage Arguments Value Author(s)
Build a grob with a legend inside.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | gtable_legend(
d,
labels,
widths,
heights,
fg_fun,
fg_params,
bg_fun = NULL,
bg_params = NULL,
title_x = NULL,
title_y = NULL,
title_label = "Title",
title_gp = gpar(fontsize = 10),
labels_pad = -1,
labels_gp = gpar(fontsize = 6),
padding = 0.3,
size_unit = "mm",
name = "legend",
vp = NULL,
orientation = c("horizontal", "vertical"),
...
)
|
d |
data.frame or matrix |
labels |
tick labels displayed at legend tick marks |
widths |
optional |
heights |
optional |
fg_fun |
grob-drawing function |
fg_params |
named list of params passed to fg_fun |
bg_fun |
grob-drawing function |
bg_params |
named list of params passed to bg_fun |
title_x |
|
title_y |
|
title_label |
character vector |
title_gp |
graphical parameters of the title |
labels_pad |
padding between the text labels |
labels_gp |
graphical parameters of the text labels |
padding |
numeric vector specifying the padding between adjacent cells. |
size_unit |
character vector defining the unit used for sizes. See |
name |
name of the grob |
vp |
optional viewport |
orientation |
choose 'horizontal' or 'vertical' |
... |
additional parameters passed to |
A gtable
object.
Yoann Pradat
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.