I added the significance letters to this graph in powerpoint. I would like to add the significance letters above each box in R. Can I modify my ggplot code to include letters above each box?
code:
p1 <- ggplot(beta_data,
aes(x=reorder(interaction, distwu,FUN = median),
y=distwu, fill=interaction)) +
geom_boxplot()+
theme(legend.position="none", axis.text.x = element_text(angle = 45, hjust = 1)) +
labs(x="Treatment interaction", y = "Distance to centroid") +
ylim(0,1.0)