MultiEnrichMap color legend
Usage
mem_legend(
mem,
x = "bottomleft",
y = NULL,
bg = "#FFFFFF99",
box.col = "transparent",
title = "Color Key",
cex = 0.8,
ncol = 1,
pch = 21,
pt.cex = 2,
pt.lwd = 2,
inset = 0,
do_directional = FALSE,
directional_column = c("same", "added-bottom", "added-top"),
directional_colors = c(`up-regulated` = "firebrick3", `no change` = "grey80",
`down-regulated` = "blue"),
...
)Arguments
- mem
listobject output frommultiEnrichMap(), specifically expected to contain element"colorV".- x, y, bg, box.col, title, cex, ncol, pch, pt.cex, pt.lwd, inset
arguments are passed to
graphics::legend(). Notept.lwdis mostly relevant withdo_direction=TRUE, which adds open circles to the legend, whose line width has defaultpt.lwd=2.- do_directional
logicalindicating whether to include directional colors defined indirectional_colors, indicated only as the border color of nodes.- directional_column
characterindicating how to add the directional colors to columns of legend, with two options:"same": appends
directional_colorsto legend colors using the definedncolnumber of columns."added-bottom": appends
directional_colorsas a new column so the resulting legend with havencol+1columns. In this case, intervening empty rows are filled with blank space, and thedirectional_colorsare shown in the bottom-most rows in the far right column of the legend."added-top": appends
directional_colorsas a new column so the resulting legend with havencol+1columns. In this case, intervening empty rows are filled with blank space, and thedirectional_colorsare shown in the top-most rows in the far right column of the legend.
- directional_colors
charactervector of R colors, named by the label to be shown in the legend, displayed in order (top to bottom, left to right) they appear in this vector. To remove the entry"no change", supply a new vector:directional_colors=c(up.regulated="firebrick3", down.regulated="blue")- ...
additional arguments are passed to
legend().
Details
This function is a simple wrapper around legend() to add
a color key to a plot, typically for igraph plots.
See also
Other jam plot functions:
adjust_polygon_border(),
grid_with_title(),
jam_igraph(),
mem_enrichment_heatmap(),
mem_gene_path_heatmap(),
mem_multienrichplot(),
mem_plot_folio(),
plot_layout_scale()