Show percent % instead of counts in charts of categorical variables

前端 未结 8 2373
梦如初夏
梦如初夏 2020-11-22 06:06

I\'m plotting a categorical variable and instead of showing the counts for each category value.

I\'m looking for a way to get ggplot to display the perc

8条回答
  •  有刺的猬
    2020-11-22 06:25

    With ggplot2 version 2.1.0 it is

    + scale_y_continuous(labels = scales::percent)
    

提交回复
热议问题