anno_histogram(x, which = c("column", "row"), gp = gpar(fill = "#CCCCCC"), ...)
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.hist
HeatmapAnnotation
constructor method.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)
Run the code above in your browser using DataLab