今天的推文先介绍右上角的方块热图实现办法吧!
首先是方块四周的灰色边框
这里使用到的是geom_tile()函数。...把填充设置为白色,然后把边框线设置为灰色就可以达成这种效果
下面是一个简单小例子
示例数据
?...)
ggplot()+
geom_tile(data=df5,aes(x=x,y=y),
fill="white",color="grey")
?...image.png
接下来简单美化
ggplot()+
geom_tile(data=dftmp,aes(x,y),fill="white",color="grey")+
geom_point(...(ggstar)
ggplot()+
geom_tile(data=dftmp,aes(x,y),fill="white",color="grey")+
geom_star(data=dftmp