Create balloon plot with ggplot2: use ..count.. to adjust size of geom_point?

后端 未结 1 1910
小鲜肉
小鲜肉 2021-01-22 01:44

I want to essentially create a balloon plot with ggplot2 where the size of the points are the frequency of data at a given coordinate.

Given the data.frame

相关标签:
1条回答
  • 2021-01-22 02:04

    Per @BenBolker's suggestion, I found a solution using stat_sum():

    ggplot(d, aes(value.x, value.y, size = ..n..)) + stat_sum()
    
    0 讨论(0)
提交回复
热议问题