# discrete character
SingleAnnotation(name = "test", value = c("a", "a", "a", "b", "b", "b"))
SingleAnnotation(name = "test", value = c("a", "a", "a", "b", "b", "b"),
which = "row")
# with defined colors
SingleAnnotation(value = c("a", "a", "a", "b", "b", "b"),
col = c("a" = "red", "b" = "blue"))
# continuous numbers
require(circlize)
SingleAnnotation(value = 1:10)
SingleAnnotation(value = 1:10, col = colorRamp2(c(1, 10), c("blue", "red")))
# self-defined graphic function
SingleAnnotation(fun = anno_points(1:10))
Run the code above in your browser using DataLab