我有一个包含数字的小矩阵,我想将其转换到热图中,并将数字保存在其中。以下是数据:
print(cor.matrix)
stock.GLS stock.NVS stock.PLX
stock.GLS 1.0000000 0.4078177 0.2416839
stock.NVS 0.4078177 1.0000000 0.1485917
stock.PLX 0.2416839 0.1485917 1.0000000这就是我制作热图的方法。
我想让数字像这里一样进入方块[display a matrix, including the values, as a heatmap,但使用这个包。有什么想法吗?
library(ComplexHeatmap)
Heatmap(cor.matrix,
cluster_columns=FALSE,
cluster_rows=FALSE
)输出如下所示:

发布于 2020-04-30 02:05:29
它是来自ComplexHeatmap complete reference的2.9.1 cell_fun你正在寻找什么(https://jokergoo.github.io/ComplexHeatmap-reference/book/a-single-heatmap.html#customize-the-heatmap-body)
https://stackoverflow.com/questions/61408539
复制相似问题