How to add a condition to the geom_point size?

后端 未结 2 407
鱼传尺愫
鱼传尺愫 2020-12-03 08:53

I am trying to add a condition to geom_point size and I\'ve pasted my example below. I would like geom_point size to be 2 when n_in_stat is 4 or more, and size = 5 when n_i

2条回答
  •  猫巷女王i
    2020-12-03 09:25

    scale_size_manual sets the sizes for a discrete variable.

    geom_point(aes(size =n_in_stat>4)) + scale_size_manual(values=c(2,5))
    

提交回复
热议问题