DEEELegend: Add legends

Description Usage Arguments Examples

View source: R/HM_HeatnAxisnLeg.R

Description

DEEELegend adds legends to existing heatmap.

Usage

1
DEEELegend(pos, textPos = NULL, cex = 1, labels, colSet = NULL)

Arguments

pos

A vector of length four specifying (xleft, ybottom, xright, ytop), indicating the position of legend.

textPos

A list of two vectors of numerics indicating the position of the label positions.

cex

A numeric indicating the cex of text in legend.

labels

A vector of strings added to the legend.

colSet

A vector of strings giving the color range of legend. Usually not need to be specified.

Examples

1
2
3
4
5
6
7
testMatrix = matrix(sample(1:100), 10, 10)
colnames(testMatrix) = 1:10
rownames(testMatrix) = 1:10
DEEEHeat(testMatrix)
DEEEAxis(lm = 0, rm = 10, bm = 10, tm = 11, sep = c(1, 3, 5), colSet = 2:5)
DEEELegend(pos = c(10.5, 5, 11, 10), labels = c(0, 50, 100), textPos = list(x = c(11.5,
 11.5, 11.5), y = c(5, 7.5, 10)))

ziyanyin/DEEE documentation built on May 28, 2017, 1:51 p.m.