mat <- matrix(rnorm(100), nrow = 10)
ht <- ComplexHeatmap::Heatmap(mat, name = "expr")
lgd <- list(ComplexHeatmap::Legend(title = "expr", at = c(-2, 0, 2)))
out <- heatmap_fixsize(
width = NULL,
width_sum = 6,
height = NULL,
height_sum = 4,
units = "in",
ht_list = ht,
legend_list = lgd
)
out
Run the code above in your browser using DataLab