defining minimum point size in ggplot2 - geom_point

前端 未结 1 1168
逝去的感伤
逝去的感伤 2020-12-14 00:53

Let\'s say I have a lot of values around 0,1 and a few around 10. I have mapped them i.e., with:

geom_point(aes(size=value))

..which gives

1条回答
  •  爱一瞬间的悲伤
    2020-12-14 00:59

    If you look in ?scale_size you'll see range argument:

    df <- data.frame(x = 1:10,y = runif(10),sz = c(rep(1,8),10,10))
    
    ggplot(df,aes(x = x,y = y,size = sz)) + 
        geom_point() + 
        scale_size_continuous(range = c(2,4))
    

    0 讨论(0)
提交回复
热议问题