相关矩阵的corrplot和pheatmap之间的区别?如何使两者保持一致

difference between corrplot and pheatmap of correlation matrix? how to make it consistent between the two

我注意到 corrplot 制作的相关图与 pheatmap 制作的不同。 原始数据: enter link description here

corrplot 中的相关矩阵,

count = read.csv('data_here.csv') 
mtx = cor(count, method = 'kendall')

corrplot(mtx, method="color", tl.cex = .35, 
         order="hclust", hclust.method = 'complete')

想在绘图的轴上添加树状图,但尚未使用 ccorrplot 解决... 所以我尝试了 pheatmap,

mtx %>% pheatmap(
fontsize = 3,
clustering_method = 'complete')

很明显,这两个包的集群不同。例如,基因 RSPO3

受此启发post, https://www.datanovia.com/en/blog/clustering-using-correlation-as-distance-measures-in-r/

这样想出来的!

pheatmap(mtx,
fontsize = 3,
clustering_distance_cols = as.dist(1 - mtx),
clustering_distance_rows = as.dist(1 - mtx)
)