Add letters automatically over errorbar of the boxplot in ggplot2

Hi,

I want to show significant differences in my boxplot (ggplot2) in R. I found how to generate label using Tukey test. However, I'm struggling at placing label on top of each errorbar.

Here the problematic line in my R script:

geom_text(data = Tukey_test, aes(x = Genotype, y = Value, label = Letters_Tukey))

By using this line (y=Value), the letters (label) for significant differences are placed in the middle of each box. How do I manage to find these letters just above the errorbar?

Thanks for your help !

Alan

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.