显示条形图中的计数 - 因子

时间:2016-04-10 10:07:28

标签: r ggplot2 geom-bar

我在ggplot2中有这个图形,我想在每个段或百分比中添加图形计数。计数在这里

kod是5组的因素 stamg是因子0/1

ggplot(databak, aes(factor(kod), fill = factor(stamg))) +
  geom_bar(position = "fill")

that is my geom bar plot without counts

this is a table of counts

0 个答案:

没有答案