我已经使用了以下代码:
ggplot(dffinal, aes(x = Vertical)) +
geom_bar(aes(y = (..count..)/sum(..count..),fill=Reasons)) +
geom_text(aes(y = ((..count..)/sum(..count..)), label =
scales::percent((..count..)/sum(..count..))), stat = "count", vjust = -0.25)
+scale_y_continuous(labels =scales::percent)
但是我想要在每次填充中显示单个填充的值。此代码仅显示顶部的总百分比。我该怎么办?