Description Usage Arguments Value See Also Examples
Making legend grobs
1 2 3 4 5 6 7 8 9 10 | Legend(at, labels = at, nrow = NULL, ncol = 1, col_fun,
grid_height = unit(4, "mm"), grid_width = unit(4, "mm"), gap = unit(2, "mm"),
labels_gp = gpar(fontsize = 10),
border = NULL, background = "#EEEEEE",
type = "grid", legend_gp = gpar(),
pch = 16, size = unit(2, "mm"),
legend_height = NULL, legend_width = NULL,
direction = c("vertical", "horizontal"),
title = "", title_gp = gpar(fontsize = 10, fontface = "bold"),
title_position = c("topleft", "topcenter", "leftcenter", "lefttop"))
|
at |
breaks, can be wither numeric or character |
labels |
labels corresponding to |
nrow |
if there are too many legends, they can be positioned in an array, this controls number of rows |
ncol |
if there are too many legends, they can be positioned in an array, this controls number of columns. At a same time only one of |
col_fun |
a color mapping function which is used to make a continuous color bar |
grid_height |
height of legend grid |
grid_width |
width of legend grid |
gap |
when legends are put in multiple columns, this is the gap between neighbouring columns, measured as a |
labels_gp |
graphic parameters for labels |
border |
color of legend borders, also for the ticks in the continuous legend |
background |
background colors |
type |
type of legends, can be |
legend_gp |
graphic parameters for the legend |
pch |
type of points |
size |
size of points |
legend_height |
height of the whole legend, used when |
legend_width |
width of the whole legend, used when |
direction |
direction of the continuous legend |
title |
title of the legend |
title_gp |
graphic parameters of title |
title_position |
position of title according to the legend |
A grob
object
packLegend
packs multiple legends into one grob
object
1 2 | # There is no example
NULL
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.