相关疑难解决方法(0)

单元格之间的ggplot tile线

我正在使用ggplot并geom_tile形成热图.我希望在细胞之间插入一些微弱的线条.

例如:

我的ggplot geom_tile热图:

library(ggplot2)
library(reshape2)
data("iris")
x = melt(cor(iris[,1:4]))
ggplot(data=x,aes(Var1,Var2,fill=value)) + geom_tile() # No line between the cells
Run Code Online (Sandbox Code Playgroud)

我想要什么(来自R中的d3heatmap包)

library(d3heatmap)
data("iris")
x = cor(iris[,1:4])
d3heatmap(cor(iris[,1:4]),Rowv = F,Colv = F) #There is a faint line between the cells
Run Code Online (Sandbox Code Playgroud)

(抱歉无法发布任何图片)谢谢!

r heatmap ggplot2

5
推荐指数
1
解决办法
3357
查看次数

标签 统计

ggplot2 ×1

heatmap ×1

r ×1