标签: r ggplot2
我正在绘制热图,但传说中总是有一个灰色矩形。有谁知道如何删除它?
library(ggplot2) set.seed(1) m <- data.frame(x=rnorm(100),y=rnorm(100)) ggplot(m, aes(x,y))+stat_density2d(aes(fill=..level.., alpha=0.1),geom ="polygon")+ scale_fill_continuous(high='red',low='green')