d1da987e | \name{draw-SingleAnnotation-method} \alias{draw,SingleAnnotation-method} \title{ |
6f1307c6 | Draw the single annotation |
d1da987e | } \description{ |
6f1307c6 | Draw the single annotation |
d1da987e | } \usage{ |
ba8a5070 | \S4method{draw}{SingleAnnotation}(object, index, k = NULL, n = NULL) } |
d1da987e | \arguments{ \item{object}{a \code{\link{SingleAnnotation-class}} object.} \item{index}{a vector of orders} |
e746cf58 | \item{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.} |
6cfc4f11 | \item{n}{total number of row slices} |
ba8a5070 | |
d1da987e | } \details{ |
6f1307c6 | A viewport is created. |
7ab3fd24 | |
6f1307c6 | The graphics would be different depending the annotation is a row annotation or a column annotation. |
d1da987e | } \value{ |
6f1307c6 | No value is returned. |
d1da987e | } \author{ |
6f1307c6 | Zuguang Gu <z.gu@dkfz.de> |
d1da987e | } \examples{ 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)) |
f597719b | grid.newpage(); draw(anno, 1:10) |
ba8a5070 | |
f597719b | } |