anno_histogram: Using histogram as annotation

Description Usage Arguments Value Author(s) Examples

Description

Using histogram as annotation

Usage

1
anno_histogram(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"), ...)

Arguments

x

a matrix or a list. If x is a matrix and if which is column, statistics for histogram is calculated by columns, if which is row, the calculation is by rows.

which

is the annotation a column annotation or a row annotation?

gp

graphic parameters

...

pass to hist

Value

A graphic function which can be set in HeatmapAnnotation constructor method.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
mat = matrix(rnorm(32), nrow = 4)
f = anno_histogram(mat)
grid.newpage(); f(1:8)

f = anno_histogram(mat, which = "row")
grid.newpage(); f(1:4)

lt = lapply(1:4, function(i) rnorm(8))
f = anno_histogram(lt)
grid.newpage(); f(1:4)

eilslabs/ComplexHeatmap documentation built on May 16, 2019, 1:21 a.m.