chalabi.elahe at yahoo.de
2016-Jun-21 09:48 UTC
[R] duplicate labels in Bar chart geom_text()
Hi all, how should I avoid duplicate labels in geom_text for bar chart? in the bar chart below I have name of one country repeated several times on my bars, I only want COUNTRY to be shown above each bar: ggplot(df,aes(factor(Variable1),y=Variable2,fill=Variable3))+geom_bar(stat='identity')+geom_text(paste0(df$COUNTRY),position=position_dodge(width=0.2)) Thanks for any help! Elahe