如何在R中的热图中放置黑色边框 [英] How to put black borders in heatmap in R
本文介绍了如何在R中的热图中放置黑色边框的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好
我在R中使用heatmap.plus创建了一个热图,该热图在链接中显示
Hi I created a heatmap in R using "heatmap.plus" which is shown in the link
http://i.stack.imgur.com/hizBf.jpg
但我需要热图映射如下图所示的热图,它是从其他GUI软件创建的。
but I need the heat map to look like the heatmap shown in below link which was created from some other GUI software
http://i.stack.imgur.com/Y8Faj.png
如何在每个热图中放置黑色边框元素在R
How can I put black borders in every heatmap element in R
推荐答案
如果您从学习R博客,并将此段落的颜色更改为黑色,您将得到:
If you follow the tutorial from Learn R blog and change the color in this paragraph to black, you will get:
(p <- ggplot(nba.m, aes(variable, Name)) +
geom_tile(aes(fill = rescale), colour = "black") +
scale_fill_gradient(low = "white",high = "steelblue"))
这篇关于如何在R中的热图中放置黑色边框的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文