I'd like to know if it's possible to annotate p-values at the top of the graph and in between 2 bar plots. In my case, using ggplot2, I have a faceted graph with 2 conditions (Passage and Isolated) and in each condition, there are 3 levels/3 bar graphs (GA, CH, KO). If it's possible, I have some p-values from pairwise comparisons (GA vs CH, CH vs KO, GA vs KO) that I would like to show on the graph itself.
My ggplot script is below:
#plot
dev.new()
accentrating_comb <- ggplot(ch_ko_am_comb, aes(x=speaker_type, y=Mean, fill=speaker_type)) +
geom_bar(position=position_dodge(width=1), stat="identity", colour="black", size=.5) +
geom_errorbar(aes(ymin=cllo, ymax=clup), colour="black", size=.3, width=.2, position=position_dodge(width=1)) +
geom_text(aes(label=lable), colour="black", vjust=-0.5, size=10, hjust=-2) +
coord_cartesian(ylim=c(0,10)) +
ylab("Mean Accent Rating") +
scale_fill_brewer(type = "div", palette = "Greys") +
guides(fill=guide_legend("Accent")) +
theme_bw() +
theme(plot.title = element_text(size = 22), axis.title.x = element_blank(), axis.title.y = element_text(size = 14), axis.line = element_line(colour = "black"), panel.grid.major = element_blank(), panel.grid.minor = element_blank(), strip.text.x = element_text(size = 14), axis.text.x = element_text(size=14), legend.title=element_text(size=14), legend.text=element_text(size=14), panel.margin.x=unit(20,"pt")) +
facet_wrap( ~ condition ) #this creates multiple panels
print(accentrating_comb)
#dev.off()