draw-SingleAnnotation-method: Draw the single annotation

Description Usage Arguments Details Value Author(s) Examples

Description

Draw the single annotation

Usage

1
2
## S4 method for signature 'SingleAnnotation'
draw(object, index, k = NULL, n = NULL)

Arguments

object

a SingleAnnotation-class object.

index

a vector of orders

k

if row annotation is splitted, the value identifies which row slice. It is only used for the names of the viewport which contains the annotation graphics.

n

total number of row slices

Details

A viewport is created.

The graphics would be different depending the annotation is a row annotation or a column annotation.

Value

No value is returned.

Author(s)

Zuguang Gu <z.gu@dkfz.de>

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
anno = SingleAnnotation(name = "test", value = c("a", "a", "a", "b", "b", "b"))
grid.newpage(); draw(anno, 1:5)
grid.newpage(); draw(anno, c(1, 4, 3, 5, 2))

anno = SingleAnnotation(value = c("a", "a", "a", "b", "b", "b"), 
    col = c("a" = "red", "b" = "blue"))
grid.newpage(); draw(anno, 1:5)
grid.newpage(); draw(anno, c(1, 4, 3, 5, 2))

anno = SingleAnnotation(value = c("a", "a", "a", "b", "b", "b"), 
    col = c("a" = "red", "b" = "blue"), which = "row")
grid.newpage(); draw(anno, 1:5)

anno = SingleAnnotation(value = 1:10)
grid.newpage(); draw(anno, 1:10)

require(circlize)
anno = SingleAnnotation(value = 1:10, col = colorRamp2(c(1, 10), c("blue", "red")))
grid.newpage(); draw(anno, 1:10)

anno = SingleAnnotation(fun = anno_points(1:10))
grid.newpage(); draw(anno, 1:10)

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