ggplot2饼图添加百分比

问题描述

初学者的问题。如果我有以下代码

onlyfranks <- filter(match_player,match_player$civ == "Franks")

ggplot(onlyfranks) + 
  geom_bar(aes(x = civ,fill = winner)) + 
  coord_polar(theta = "y") + 
  scale_fill_manual("legend",values = c("Loose" = "orange","Win" = "purple"))

以及以下饼图:

enter image description here

如何使用 geom_text 将百分比放在饼图上?

提前致谢

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)