简体   繁体   English

以(x,y)协调顺序创建热图

[英]Create heatmap with (x,y) coordinated order

I draw heatmap using R 我使用R绘制热图

library("ggplots")
heatmap.2(correlation,col=topo.colors(75), scale="none",
      key=TRUE, symkey=FALSE, density.info="none", trace="none", cexRow=0.5)

But, the heatmap is not assigned against the order of data(corrrelation). 但是,热图并未针对数据顺序进行分配(相关性)。 If you take a close look on the x and y labels, it is totally mixed up. 如果仔细看一下x和y标签,它们完全是混在一起的。 So, how can I draw heatmap through just input-data ordered (x,y) format? 那么,如何仅通过输入数据有序(x,y)格式绘制热图?

在此处输入图片说明

I think you want to add Rowv=FALSE and Colv=FALSE arguments to your function. 我认为您想向函数添加Rowv = FALSE和Colv = FALSE参数。

The default is to cluster the data by rows and columns, and setting Rowv and Colv both to FALSE (or NA) will prevent this: 默认设置是按行和列对数据进行聚类,将Rowv和Colv都设置为FALSE(或NA)将防止此情况:

library("gplots")
heatmap.2(correlation,col=topo.colors(75), scale="none",
      key=TRUE, symkey=FALSE, density.info="none", trace="none", cexRow=0.5, Colv=FALSE, Rowv=FALSE)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM