How to put black borders in heatmap in R

后端 未结 3 2014
清歌不尽
清歌不尽 2021-02-03 12:49

Hi I created a heatmap in R using \"heatmap.plus\" which is shown in the link

http://i.stack.imgur.com/hizBf.jpg

but I need the heat map to look like the heatma

3条回答
  •  暗喜
    暗喜 (楼主)
    2021-02-03 13:42

    Try this:

     library(plotrix)
    
     #Build a 40 Row by 40 Column Matrix
     n <- 40
     mat <- matrix(rnorm(n*n), nrow = n)
    
     #Plot it
     color2D.matplot(mat, cellcolors = color.scale(mat, c(0,0.5,1), c(1,0.5,0), 0))
    

提交回复
热议问题