jokergoo / ComplexHeatmap

Make Complex Heatmaps
https://jokergoo.github.io/ComplexHeatmap-reference/book/
Other
1.31k stars 228 forks source link

Adjust the border line thickness of Anno_barplot function #1204

Open ShaowenJ opened 2 months ago

ShaowenJ commented 2 months ago

Dear ComplexHeatmap developers!

Thanks so much for the package, I have a question regarding the Anno_barplot function Is that a way that I could adjust the border line thickness of the stacked barplot from it?

I have a long complexheatmap project which I would love to put into a publication figures. The issue is the border line would affect how it looks to put it into a figure panel size. For example like this:

image

I guess if I could remove the border line, it would look better.

image

Is that a way to do that? Here is my code:

  iso_anno = anno_barplot(df_isotype_mat, gp = gpar(fill = iso_col_vec), border = F,height = unit(2,'inches'),bar_width = 1.0)
  # Region
  top_ha = HeatmapAnnotation(Region = tmp_ds_meta_igh$Region,EXP = tmp_ds_meta_igh$ge_Aicda,col = list(Region = region_col_vec, EXP = ge_col_fun),show_annotation_name = F,show_legend = F)
  # Membrane & secreted
  bottom_ha = HeatmapAnnotation(isotype = iso_anno,Membrane = tmp_ds_meta_igh$Membrane, Secreted = tmp_ds_meta_igh$Secreted, col = list(Membrane = c("0" = "white", "1" = "blue"),Secreted = c("0" = "white", "1" = "#7B7485")),show_annotation_name = F,show_legend = F)

  ht_list = Heatmap(t(as.matrix(df_mutation)), heatmap_legend_param = list(title = "Mutation Rate"),col = col_fun, cluster_rows = F, cluster_columns = F,show_column_names = F,show_row_names = F,top_annotation = top_ha, bottom_annotation =bottom_ha, height = unit(0.5,'inches'),show_heatmap_legend = F)

Thanks so much!!!

Best, Shaowen

ShaowenJ commented 2 months ago

I found it from previous issue: https://github.com/jokergoo/ComplexHeatmap/issues/844#issuecomment-976302257 anno_barplot(..., gp = gpar(col = NA, ...))