在下面的示例中,一个 3 列和 5 行的矩阵。当我创建热图时,任何具有类似数字的行,如下例 (0.3,0.3,0.3),它在热图中显示白色。我的意图是将其更改为任何理想的颜色。示例:这是一个示例:
A = matrix(c(0.0183207, 0.0000000, 0.1468750, 0.03, 0.03, 0.03,0.4544720,0.0000000,0.1395850,0.002,0,0,1.1,1,1),nrow=5,ncol=3,byrow = TRUE)
dimnames(A) = list(c("row1", "row2","row3","row4","row5"),c("col1", "col2", "col3"))
heatmap.2( A,col =redgreen, scale = "row", cexRow=0.3, cexCol=0.8, margins=c(6,6), trace="none")
非常感谢你的帮助