Pheatmap is an R package, which is famous for its heatmap annotation function. Standard color key profile is well-proportioned based on the value of related data frame. If we want to set different split point or uneven color range, what should we do? Here is the code:
Plus, it should be noticed that we should avoid red-green schema when it is supposed to be shown to someone else. About 8.73% of males and 1.69% of females were found to be color blind1 and will have trouble reading red-green heatmap.
Ahsana S, Hussain R, Fareed M, et al. Prevalence of red-green color vision defects among Muslim males and females of Manipur, India[J]. Iranian journal of public health, 2013, 42(1): 16. ↩