I saw this answer but couldn\'t replicate it.
I get my data like this:
df = data.frame(x = rep(sample(letters, 4), 2), y = round(run
Just one minor change solves the issue. You need to specify group=x inside your geom_text(aes(...)) call.
group=x
geom_text(aes(...))
ggplot(df) + geom_bar(aes(z, y, fill=x), position=position_dodge(width=1), stat="identity") + geom_text(aes(z,y,label=perc, group=x), position=position_dodge(width=1), size=4)