热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

如何在Rheatmap中改变rowidecolors的位置-HowtochangepositionofrowsidecolorsinRheatmap.2

WhenusingtheRheatmap.2functionfromthegplotspackage,onecanpasstheargumentrowsidecolors

When using the R heatmap.2 function from the gplots package, one can pass the argument rowsidecolors, which will then insert a column next to the dendrogram as shown here. I was wondering if it is possible to relocate the column to the opposite side of the heatmap next to the row labels?

当使用gplots包中的R heatmap.2函数时,可以传递参数rowsidecolors,然后在树形图旁边插入一列,如下所示。我想知道是否可以将列重新定位到行标签旁边的热图的另一侧?

1 个解决方案

#1


1  

Read "help(heatmap.2)" about what happens to the 4 plot components when "RowSideColors" is used. See Moving color key in R heatmap.2 (function of gplots package) for a good explanation of how to control their locations.

阅读“help(heatmap.2)”,了解使用“RowSideColors”时4个绘图组件会发生什么。有关如何控制其位置的详细说明,请参阅R heatmap.2中的移动颜色键(gplots包的功能)。

Try this:

尝试这个:

heatmap.2 ( 
    matrix(rnorm(100), 10, 10),
    lmat=rbind(c(0,5,4,0,0), c(0,3,2,1,0)), 
    lhei=c(2,5),
    lwid=c(1,1,4,0.25,1),
    col=colorpanel(20, "blue", "black", "red"),
    key = F, trace = "none", scale = "row",
    RowSideColors = rainbow(10)
)

推荐阅读
author-avatar
捕鱼达人2502897023
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有