ComplexHeatmap (version 1.10.2)

Legend: Making legend grobs

Description

Making legend grobs

Usage

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"))

Arguments

at
breaks, can be wither numeric or character
labels
labels corresponding to at
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 nrow and ncol can be specified.
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 unit object
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 grid, points and lines
legend_gp
graphic parameters for the legend
pch
type of points
size
size of points
legend_height
height of the whole legend, used when col_fun is specified and direction is set to vertical
legend_width
width of the whole legend, used when col_fun is specified and direction is set to horizontal
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

Value

Examples

# There is no example
NULL