Reputation: 135
How to change the border size in ComplexHeatmap?
I can add border by setting heatmap_border = TRUE. Is there a way to change the size/width? Below is a figure with different border size. The inner boder looks thinner than the heatmap border.
I am using R package ComplexHeatmap.
Thanks!
Upvotes: 0
Views: 1693
Reputation: 135
Heatmap(as.matrix(snps.cor),name="snps1", cluster_rows = FALSE,cluster_columns = FALSE,show_row_dend=FALSE,
show_row_names = FALSE,
show_column_names = FALSE,
border = TRUE,column_split = split,row_split=split,
col = col_fun2,top_annotation = ha,
column_gap = unit(0, "mm"),row_gap = unit(0, "mm"))
# draw(ht, heatmap_legend_side = "bottom", annotation_legend_side = "bottom")
decorate_heatmap_body("snps1", slice = 12,column_slice = 4, {
grid.rect(gp = gpar(fill = "transparent", col = "black", lwd = 2))
})
I found I can change the width by decorate_heatmap_body. If there is no slice parameter, only the border of top left slice is changed. I can change the border for speficic slice by adding slice = 12,column_slice = 4
.
How can I changed the border width for whole heatmap?
Upvotes: 1