[英]R - heatmap.2 log scale
Is there a way to use a log scale for heatmap.2 or do I have to log the data beforehand before the plot? 有没有办法使用热图的对数刻度.2还是我必须事先在绘图之前记录数据? Currently, I have a 50 x 50 matrix with really big numbers and so my heatmap is showing very little depth. 目前,我有一个50 x 50矩阵,数字非常大,因此我的热图显示的深度非常小。
What's the problem with just taking logs beforehand? 事先记录日志有什么问题? It's as simple as... 就像......一样简单
m<- matrix( sample( c(10,100,1000) , 16 , repl = TRUE ) , 4 , 4 )
# [,1] [,2] [,3] [,4]
#[1,] 10 10 100 100
#[2,] 100 10 100 1000
#[3,] 100 1000 100 100
#[4,] 100 10 10 1000
log10(m)
# [,1] [,2] [,3] [,4]
#[1,] 1 1 2 2
#[2,] 2 1 2 3
#[3,] 2 3 2 2
#[4,] 2 1 1 3
Or indeed require( gplots ); heatmap.2( log10(m) )
或者确实require( gplots ); heatmap.2( log10(m) )
require( gplots ); heatmap.2( log10(m) )
. require( gplots ); heatmap.2( log10(m) )
。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.