R:哪个热图/图像在没有任何树状图的情况下获得行排序图? [英] R: Which heatmap/image to get row-sorted plot without any dendrogram?
问题描述
哪个包最适合热图/图像,仅对行进行排序,但不显示任何树形图或其他视觉混乱(只是在两个轴上都带有自动命名标签的2D彩色网格) 。除了基本的数字排序之外,我不需要花哨的聚类。数据是一个39x10的数字表,范围(0,0.21)我想要可视化。
Which package is best for a heatmap/image with sorting on rows only, but don't show any dendrogram or other visual clutter (just a 2D colored grid with automatic named labels on both axes). I don't need fancy clustering beyond basic numeric sorting. The data is a 39x10 table of numerics in the range (0,0.21) which I want to visualize.
我搜索了SO(参见这个)和R网站,并尝试了几个。查看 R图形手册以查看出色的可搜索性屏幕截图列表和相应的软件包。
I searched SO (see this) and the R sites, and tried a few out. Check out R Graphical Manual to see an excellent searchable list of screenshots and corresponding packages.
软件包的范围令人困惑 - 哪一个是首选热图(如 ggplot2 适用于大多数其他绘图)?这是我到目前为止所发现的:
The range of packages is confusing - which one is the preferred heatmap (like ggplot2 is for most other plotting)? Here is what I found out so far:
- base ::图像 - 错误,轴上没有名称标签,没有排序/聚类
- base :: heatmap - 选项比以下内容更难理解:
- pheatmap :: pheatmap - 很棒,但似乎无法关闭
树状图? (任何黑客?) - ggplot2人使用geom_tile,正如Andrie指出的那样
- gplots :: heatmap.2 , ref - 似乎是b b b受到生物技术人士的青睐,但对于我的目的来说却是过度杀戮。 (与 ggplot * 或Wickham教授没有
的关系) - plotrix :: color2D.matplot 也存在
- base::image - bad, no name labels on axes, no sorting/clustering
- base::heatmap - options are far less intelligible than the following:
- pheatmap::pheatmap - fantastic but can't seem to turn off the dendrograms? (any hacks?)
- ggplot2 people use geom_tile, as Andrie points out
- gplots::heatmap.2 , ref - seems to be favored by biotech people, but way overkill for my purposes. (no relation to ggplot* or Prof Wickham)
- plotrix::color2D.matplot also exists
base :: heatmap
很烦人,即使使用args heatmap( ...,Colv = NA,keep.dendro = FALSE)
它仍然在行上绘制不需要的树形图。
base::heatmap
is annoying, even with args heatmap(..., Colv=NA, keep.dendro=FALSE)
it still plots the unwanted dendrogram on rows.
For现在我要用 pheatmap(...,cluster_cols = FALSE,cluster_rows = FALSE)
并手动预先分配我的表,就像这个人一样: 热图中的行数排序?
For now I'm going with pheatmap(..., cluster_cols=FALSE, cluster_rows=FALSE)
and manually presorting my table, like this guy: Order of rows in heatmap?
附录:要显示每个单元格内的值,请参阅:显示矩阵,包括值,作为热图。我不需要那个,但它很不错。
Addendum: to display the value inside each cell, see: display a matrix, including the values, as a heatmap . I didn't need that but it's nice-to-have.
推荐答案
使用 pheatmap
你可以使用选项 treeheight_row
和 treeheight_col
并将它们设置为0.
With pheatmap
you can use options treeheight_row
and treeheight_col
and set these to 0.
这篇关于R:哪个热图/图像在没有任何树状图的情况下获得行排序图?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!