geom_text how to position the text on bar as I want?
I would like to adjust the text on the barplot. I tried to adjust hjust/vjust to display as I like it but it seems like it's not working properly. ggplot(data) + geom_bar(aes(name, count, fill = week), stat='identity', position = 'dodge') + geom_text(aes(name,count, label=count),hjust=0.5, vjust=3, size=2, position = position_dodge(width = 1)) + coord_flip() So I would like the numbers to situate on each bar, in the middle, at the right-edge so it's readable without overlapping like the last parts. Edit: The easier solution to get hjust / vjust to behave intelligently is to add the group