I\'m looking for a way to label a stacked bar chart with percentages while the y-axis shows the original count (using ggplot). Here is a MWE for the plot without labels:
I agree with Johanna. You could try:
d <- aggregate(.~region+species, df, length) d$percent <- paste(round(ID/sum(ID)*100),'%',sep='') ggplot(d, aes(region, ID, fill=species)) + geom_bar(stat='identity') + geom_text(position='stack', aes(label=paste(round(ID/sum(ID)*100),'%',sep='')), vjust=5)