我使用下面的函数从 48 列 X 32 行的矩阵创建热图:
heatmap.2(all.data,Rowv = FALSE, Colv = FALSE, trace="none",main="All data",col=colorRampPalette(c("green","yellow","red")))
由于删除了树状图,它给了我一些警告,但它仍然给了我想要的热图和颜色键,发生了一些事情,现在当我尝试运行相同的东西时,它给了我没有颜色键的情节和一个错误:
Error in plot.new() : figure margins too large
In addition: Warning messages:
1: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none", :
Discrepancy: Rowv is FALSE, while dendrogram is `both'. Omitting row dendogram.
2: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none", :
Discrepancy: Colv is FALSE, while dendrogram is `none'. Omitting column dendogram.
如果我将所有边的边距更改为 1:
par(mar=c(1,1,1,1))
heatmap.2(all.data,Rowv = FALSE, Colv = FALSE, trace="none",main="All data",col=colorRampPalette(c("green","yellow","red")))
再试一次,它不会制作热图并给我这个错误:
Error in .External.graphics(C_layout, num.rows, num.cols, mat, as.integer(num.figures), :
invalid graphics state
In addition: Warning messages:
1: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none", :
Discrepancy: Rowv is FALSE, while dendrogram is `both'. Omitting row dendogram.
2: In heatmap.2(all.data, Rowv = FALSE, Colv = FALSE, trace = "none", :
Discrepancy: Colv is FALSE, while dendrogram is `none'. Omitting column dendogram.
我也尝试添加到功能键=T,但颜色键仍然没有出现在热图中,任何帮助将非常感激!!!