[R] duplicate labels in Bar chart geom_text()

chalabi.elahe at yahoo.de chalabi.elahe at yahoo.de
Tue Jun 21 11:48:55 CEST 2016


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



More information about the R-help mailing list