散点图
使用颜色对不同密度点进行区分
ggplot(data, aes(y = 1 - V2, x = V3)) +
stat_bin_2d(binwidth = c(0.01, 0.01)) +
scale_fill_gradient2(mid = "gray", high = "red") +
ylim(c(0, 2)) +
xlim(c(0, 2)) +
theme_bw() +
theme(
axis.text = element_blank(),
axis.title = element_blank()
)参考
Last updated