Normalizing y-axis in histograms in R ggplot to proportion

后端 未结 4 970
轮回少年
轮回少年 2020-11-29 17:23

I have a very simple question causing me to bang my head on the wall.

I would like to scale the y-axis of my histogram to reflect the proportion (0 to 1) that each b

4条回答
  •  清酒与你
    2020-11-29 18:30

    I just wanted to scale the axis, to divide the y-axis by 1000, so I did:

    ggplot(mydataframe, aes(x=value)) +
      geom_histogram(aes(y=..count../1000))
    

提交回复
热议问题