2019-04-24
阅读量:
676
如何在热力图上添加相关性注释呢
p_cor.order + scale_fill_gradient(name="Value", low = "white",high = "red") +
theme(axis.text.x = element_text(vjust = 0.5, hjust = 0.5, angle = 90))+
coord_fixed(ratio=1)+
theme(axis.text= element_text(size = 8,family="ARL"))+
theme(plot.margin = unit(c(0.1,0,0,0), unit="mm"))+
labs(x = "Var1", y = "Var2", title = "correlation")+
theme(plot.title = element_text(size = 13,hjust = 0.5,family = "ARL" ))+
theme(legend.key.width=unit(3,'mm'),legend.key.height=unit(3,'cm'))+
theme(legend.title = element_text(size = 8))+
geom_text(aes(Var1, Var2, label = value), color = "black", size = 3)
跑一下代码,出来的图就是这样的






评论(0)


暂无数据