how to put the significant level above the boxplot, and that this can be seen.

Just expand the scale limits with scale_y_continuous(expand = c(0.2, 0.2))

library(tidyverse)
library(ggsignif)

#Comparación por profundidades
metadata %>% 
    select(Depth, DO:Chlrophyll) %>% 
    gather(Parameter, Value, -Depth) %>% 
    ggplot(aes(Depth, Value, fill = Depth)) +
    geom_boxplot()+
    geom_signif(comparisons = list(c("80 cm", "Interstitial")), 
                map_signif_level=TRUE) +
    facet_wrap(~Parameter, scales = "free_y") +
    scale_y_continuous(expand = c(0.2, 0.2)) +
    theme_bw()+
    theme(panel.grid.major = element_line(colour = "white"),
          panel.grid.minor = element_blank(),
          panel.background = element_blank(),
          plot.title = element_text(hjust = 0.5, size = 14, family = "Tahoma", face = "bold"),
          text=element_text(family = "Tahoma", face ="bold"),
          axis.title = element_text(face="bold"),
          axis.text.x = element_text(colour="black", size = 11),
          axis.text.y = element_text(colour="black", size = 9),
          axis.line = element_line(size=0.5, colour = "black"))

Note: Please make your questions providing a proper REPRoducible EXample (reprex) or at least proper code formatting

2 Likes