Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

can i change the column names to the top in PHEATMAP

Tags:

r

pheatmap

I am using PHEATMAP to generate a heatmap - currently the row names and column names defaults to left and bottom - can somebody point me to option where i can change it to RIGHT and TOP.

like image 455
Neo Avatar asked Dec 11 '25 23:12

Neo


1 Answers

Unfortunately, you must use ComplexHeatmap - I'm aware OP cannot use CH but posterity for others:

library(pheatmap)
pheatmap(plot_mat, cluster_rows = T, cluster_cols = F,
         display_numbers = T, cutree_rows = 3, 
         color = hcl.colors(50, "sunsetdark", rev=F),
         border_color = "black", number_color = "black",
         fontsize_number = 9, angle_col = 0)

pheatmap

library(ComplexHeatmap)
ComplexHeatmap::pheatmap(plot_mat, cluster_rows = T, cluster_cols = F,
                         display_numbers = T, cutree_rows = 3, 
                         color = hcl.colors(50, "sunsetdark", rev=F), 
                         border_color = "black", number_color = "black",
                         fontsize_number = 9, column_names_side = c("top"),
                         angle_col = c("0"))

complexheatmap

like image 70
Barry D Avatar answered Dec 13 '25 14:12

Barry D