Add names to each variable in the box plot.

Hello everyone, I have a question regarding the boxplot that I attach. I hope you can give me a suggestion and thanks in advance.

Is it possible that there are no lines in this part ?:
theme (panel.grid.major = element_line (color = "white"),
I know that with the white color I do not see the lines in the graph, but at the time of editing they are visible when I convert them to PDF.

It is also possible to add the name of each variable in its corresponding graph of the side of the y-axis (vertical, left)?

library(tidyverse)
library(vegan)
#> Loading required package: permute
#> Loading required package: lattice
#> This is vegan 2.5-6
library(multcompView)
library(magrittr)
#> 
#> Attaching package: 'magrittr'
#> The following object is masked from 'package:purrr':
#> 
#>     set_names
#> The following object is masked from 'package:tidyr':
#> 
#>     extract
library(dplyr) 

bpdata <- data.frame(stringsAsFactors = FALSE,
                          DO = c(4.24,2.58,
                                 2.85,3.81,2.64,4.61,5.74,3.69,4.24,2.66,
                                 2.85,3.81,2.64,4.61,5.74,3.69,2.51,
                                 2.66,3.14,2.92,1.83,1.82,3.02,3.3,2.51,
                                 3.04,2.85,2.92,1.83,1.82,3.02,3.3,4.24,
                                 3.04,2.85,3.81,2.64,4.61,5.74,3.69,4.24,
                                 2.09,2.98,3.81,1.83,1.82,3.02,3.3,2.51,
                                 2.09,2.98,8.17,2.63,7.69,3.07,3.7,2.51,
                                 3.04,2.18,8.17,2.63,7.69,3.07,3.7,2.58,
                                 2.09,2.18,2.16,1.7,6.8,1.95,4.28,2.58,
                                 2.09,2.98,2.16,1.7,6.8,1.95,4.28,2.66,3.14,
                                 2.18,8.17,2.63,7.69,3.07,3.7,2.66,3.14,
                                 2.92,2.16,1.7,6.8,1.95,4.28),
                          pH = c(9.94,10.06,
                                 9.98,9.07,8.99,8.93,9.24,9.32,9.94,10,
                                 9.98,9.07,8.99,8.93,9.24,9.32,10.04,10,
                                 10,9.06,8.99,8.92,9.18,9.32,10.04,9.96,
                                 9.98,9.06,8.99,8.92,9.18,9.32,9.94,9.96,
                                 9.98,9.07,8.99,8.93,9.24,9.32,9.94,
                                 9.95,10.09,9.07,8.99,8.92,9.18,9.32,10.04,
                                 9.95,10.09,9.04,9,9.53,9.31,9.14,10.04,
                                 9.96,9.97,9.04,9,9.53,9.31,9.14,10.06,
                                 9.95,9.97,8.96,9.02,9.51,9.39,8.85,10.06,
                                 9.95,10.09,8.96,9.02,9.51,9.39,8.85,10,
                                 10,9.97,9.04,9,9.53,9.31,9.14,10,10,
                                 9.06,8.96,9.02,9.51,9.39,8.85),
                        WT = c(24.48,
                                 24.95,24.01,26.67,24.01,23.5,24.46,24.65,
                                 24.48,24.92,24.01,26.67,24.01,23.5,24.46,
                                 24.65,24.35,24.92,24,26.46,23.99,23.43,
                                 24.14,24.67,24.35,24.04,24.01,26.46,23.99,
                                 23.43,24.14,24.67,24.48,24.04,24.01,26.67,
                                 24.01,23.5,24.46,24.65,24.48,24.01,24.36,
                                 26.67,23.99,23.43,24.14,24.67,24.35,
                                 24.01,24.36,24.88,24.7,26.14,24.19,22.65,
                                 24.35,24.04,24.4,24.88,24.7,26.14,24.19,
                                 22.65,24.95,24.01,24.4,24.3,24.72,26.15,
                                 23.9,20.65,24.95,24.01,24.36,24.3,24.72,
                                 26.15,23.9,20.65,24.92,24,24.4,24.88,24.7,
                                 26.14,24.19,22.65,24.92,24,26.46,24.3,
                                 24.72,26.15,23.9,20.65),
                   Turbidity = c(87.3,95.2,
                                 98.8,24.9,43.1,49.1,68.6,69.8,87.3,113,
                                 98.8,24.9,43.1,49.1,68.6,69.8,87.7,113,
                                 96.9,39.7,49,47.6,66.6,74.1,87.7,98.5,
                                 98.8,39.7,49,47.6,66.6,74.1,87.3,98.5,
                                 98.8,24.9,43.1,49.1,68.6,69.8,87.3,95.9,
                                 97.2,24.9,49,47.6,66.6,74.1,87.7,95.9,
                                 97.2,46.9,37.2,74.2,69.9,71.3,87.7,98.5,
                                 100.6,46.9,37.2,74.2,69.9,71.3,95.2,95.9,
                                 100.6,42,36.1,74.4,44.4,71.3,95.2,95.9,
                                 97.2,42,36.1,74.4,44.4,71.3,113,96.9,
                                 100.6,46.9,37.2,74.2,69.9,71.3,113,96.9,
                                 39.7,42,36.1,74.4,44.4,71.3),
                         ORP = c(97,108.4,
                                 102.9,94,63.9,64.7,40.3,48.1,97,111.9,
                                 102.9,94,63.9,64.7,40.3,48.1,91.3,111.9,
                                 108,23.7,64.1,60.4,40.6,49.8,91.3,98.9,
                                 102.9,23.7,64.1,60.4,40.6,49.8,97,98.9,
                                 102.9,94,63.9,64.7,40.3,48.1,97,92.8,
                                 106.9,94,64.1,60.4,40.6,49.8,91.3,92.8,
                                 106.9,90.4,74.9,67.7,42,37.1,91.3,98.9,
                                 102.7,90.4,74.9,67.7,42,37.1,108.4,92.8,
                                 102.7,53,63.4,73.9,42,37.5,108.4,92.8,
                                 106.9,53,63.4,73.9,42,37.5,111.9,108,
                                 102.7,90.4,74.9,67.7,42,37.1,111.9,111.9,
                                 23.7,53,63.4,73.9,42,37.5),
                         NH4 = c(4.46,4.62,
                                 4.37,5.6,3.38,3.21,1.93,2.21,4.46,4.75,
                                 4.37,5.6,3.38,3.21,1.93,2.21,4.5,4.75,
                                 4.48,7.64,3.18,3.09,2.19,2.14,4.5,3.97,
                                 4.37,7.64,3.18,3.09,2.19,2.14,4.46,3.97,
                                 4.37,5.6,3.38,3.21,1.93,2.21,4.46,4.06,
                                 4.43,5.6,3.18,3.09,2.19,2.14,4.5,4.06,
                                 4.43,2.81,4.2,4.5,1.99,2.07,4.5,3.97,
                                 5.47,2.81,4.2,4.5,1.99,2.07,4.62,4.06,
                                 5.47,3.19,3.97,3.3,3.38,1.18,4.62,4.06,
                                 4.43,3.19,3.97,3.3,3.38,1.18,4.75,4.48,
                                 5.47,2.81,4.2,4.5,1.99,2.07,4.75,4.48,7.64,
                                 3.19,3.97,3.3,3.38,1.18),
                         NO3 = c(3.6,3.98,
                                 3.57,3.53,2.55,2.28,0.71,1.2,3.6,3.21,
                                 3.57,3.53,2.55,2.28,0.71,1.2,3.36,3.21,
                                 3.76,3.66,2.44,2.06,0.67,0.87,3.36,4.35,
                                 3.57,3.66,2.44,2.06,0.67,0.87,3.6,4.35,
                                 3.57,3.53,2.55,2.28,0.71,1.2,3.6,3.68,
                                 3.34,3.53,2.44,2.06,0.67,0.87,3.36,3.68,
                                 3.34,2.25,2.99,1.3,0.74,0.68,3.36,4.35,
                                 4.11,2.25,2.99,1.3,0.74,0.68,3.98,3.68,
                                 4.11,2.1,2.55,1.11,0.69,0.69,3.98,3.68,
                                 3.34,2.1,2.55,1.11,0.69,0.69,3.21,3.76,
                                 4.11,2.25,2.99,1.3,0.74,0.68,3.21,3.76,
                                 3.66,2.1,2.55,1.11,0.69,0.69),
                         BGA = c(279133L,
                                 279113L,265304L,11603L,218471L,226658L,
                                 267389L,267144L,279133L,270193L,265304L,11603L,
                                 218471L,226658L,267389L,267144L,267716L,
                                 270193L,279119L,66608L,213497L,242331L,
                                 267007L,261363L,267716L,279109L,265304L,66608L,
                                 213497L,242331L,267007L,261363L,279133L,
                                 279109L,265304L,11603L,218471L,226658L,
                                 267389L,267144L,279133L,279100L,279099L,
                                 11603L,213497L,242331L,267007L,261363L,267716L,
                                 279100L,279099L,246979L,169175L,272332L,
                                 269519L,272096L,267716L,279109L,278137L,
                                 246979L,169175L,272332L,269519L,272096L,
                                 279113L,279100L,278137L,174271L,159046L,271503L,
                                 261124L,271303L,279113L,279100L,279099L,
                                 174271L,159046L,271503L,261124L,271303L,
                                 270193L,279119L,278137L,246979L,169175L,
                                 272332L,269519L,272096L,270193L,279119L,66608L,
                                 174271L,159046L,271503L,261124L,271303L),
                  Chlrophyll = c(36.6,38.9,
                                 40,44,35,32.8,44,44.8,36.6,39.8,40,44,
                                 35,32.8,44,44.8,39.6,39.8,38.5,45.1,
                                 42.2,50.2,43.6,45.1,39.6,43,40,45.1,42.2,
                                 50.2,43.6,45.1,36.6,43,40,44,35,32.8,
                                 44,44.8,36.6,50,43,44,42.2,50.2,43.6,
                                 45.1,39.6,50,43,34,38.4,58.5,44.3,40,
                                 39.6,43,53.8,34,38.4,58.5,44.3,40,38.9,
                                 50,53.8,50.3,55.9,51.3,68.2,34.2,38.9,
                                 50,43,50.3,55.9,51.3,68.2,34.2,39.8,38.5,
                                 53.8,34,38.4,58.5,44.3,40,39.8,38.5,
                                 45.1,50.3,55.9,51.3,68.2,34.2),
                          EC = c(1.074,
                                 1.082,1.081,1.147,1.156,1.157,1.155,1.152,
                                 1.074,1.081,1.081,1.147,1.156,1.157,1.155,
                                 1.152,1.075,1.081,1.08,1.138,1.155,1.157,
                                 1.51,1.142,1.075,1.083,1.081,1.138,1.155,
                                 1.157,1.51,1.142,1.074,1.083,1.081,
                                 1.147,1.156,1.157,1.155,1.152,1.074,1.081,
                                 1.077,1.147,1.155,1.157,1.51,1.142,1.075,
                                 1.081,1.077,1.154,1.179,1.072,1.152,1.127,
                                 1.075,1.083,1.078,1.154,1.179,1.072,
                                 1.152,1.127,1.082,1.081,1.078,1.161,1.69,
                                 1.061,1.168,1.102,1.082,1.081,1.077,1.161,
                                 1.69,1.061,1.168,1.102,1.081,1.08,1.078,
                                 1.154,1.179,1.072,1.152,1.127,1.081,1.08,
                                 1.138,1.161,1.69,1.061,1.168,1.102),
                       Month = factor (c("Jul",
                                 "Jul","Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Jul","Jul","Jul","Aug","Aug","Aug","Sep",
                                 "Sep","Jul","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Jul","Jul","Jul","Aug",
                                 "Aug","Aug","Sep","Sep","Jul","Jul","Jul",
                                 "Aug","Aug","Aug","Sep","Sep","Jul","Jul",
                                 "Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Jul","Jul","Jul","Aug","Aug","Sep","Sep",
                                 "Sep","Jul","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Jul","Jul","Jul","Aug","Aug",
                                 "Sep","Sep","Sep","Jul","Jul","Jul",
                                 "Aug","Aug","Sep","Sep","Sep","Jul","Jul",
                                 "Jul","Aug","Aug","Sep","Sep","Sep","Jul",
                                 "Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Sep"),
                                 levels = c("Jul", "Aug", "Sep"))
)
          
  
bpdata %>% 
  gather(Parameter, Value, -Month) %>% 
  group_nest(Parameter) %>% 
  mutate(tukey = map(data, ~{
    aov(Value~Month, data = .x) %>% 
      TukeyHSD(ordered = FALSE,
               conf.level = 0.95) %>% 
      .$Month %>% 
      .[,4] %>% 
      multcompLetters() %>% 
      .['Letters'] %>% 
      as.data.frame() %>% 
      rownames_to_column("Month") %>% 
      mutate(Month = factor(Month,
                            levels = c("Jul", "Aug", "Sep")))
  }),
  data = map2(data, tukey, ~left_join(.x, .y, by = "Month"))) %>% 
  select(-tukey) %>% 
  unnest(data) %>% 
  group_by(Parameter) %>% 
  mutate(y_tukey = max(fivenum(Value)),
         y_tukey = y_tukey * 1.1) %>% 
  ggplot(aes(x = Month, y = Value, fill = Month)) +
  geom_boxplot() +
  geom_text(aes(y = y_tukey, label = Letters)) +
  scale_y_continuous(expand = c(0.03,0.03)) +
  facet_wrap(vars(Parameter), scales = "free_y") +
  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, angle = 90, hjust = 1, vjust = 1),
        axis.text.y = element_text(colour="black", size = 9),
        axis.line = element_line(size = 0.5, colour = "black"))
#> Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
#> found in Windows font database

#> Warning in grid.Call(C_stringMetric, as.graphicsAnnot(x$label)): font family not
#> found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database

#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database
#> Warning in grid.Call.graphics(C_text, as.graphicsAnnot(x$label), x$x, x$y, :
#> font family not found in Windows font database
#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

#> Warning in grid.Call(C_textBounds, as.graphicsAnnot(x$label), x$x, x$y, : font
#> family not found in Windows font database

Created on 2020-05-21 by the reprex package (v0.3.0)

Is this what you mean? I'm giving you an example with a small subset of your data. If your question is about plotting you shouldn't include all the previous data wrangling steps since they are not relevant for the question and make things harder.

library(tidyverse)

sample_data <- data.frame(
  stringsAsFactors = FALSE,
         Parameter = c("BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","BGA","BGA","BGA","BGA","BGA","BGA",
                       "BGA","BGA","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll",
                       "Chlrophyll","Chlrophyll","Chlrophyll","Chlrophyll"),
             Value = c(279133,279113,265304,11603,
                       218471,226658,267389,267144,279133,270193,265304,
                       11603,218471,226658,267389,267144,267716,270193,
                       279119,66608,213497,242331,267007,261363,267716,
                       279109,265304,66608,213497,242331,267007,261363,279133,
                       279109,265304,11603,218471,226658,267389,267144,
                       279133,279100,279099,11603,213497,242331,267007,
                       261363,267716,279100,279099,246979,169175,272332,
                       269519,272096,267716,279109,278137,246979,169175,
                       272332,269519,272096,279113,279100,278137,174271,159046,
                       271503,261124,271303,279113,279100,279099,174271,
                       159046,271503,261124,271303,270193,279119,278137,
                       246979,169175,272332,269519,272096,270193,279119,
                       66608,174271,159046,271503,261124,271303,36.6,38.9,
                       40,44,35,32.8,44,44.8,36.6,39.8,40,44,35,32.8,
                       44,44.8,39.6,39.8,38.5,45.1,42.2,50.2,43.6,
                       45.1,39.6,43,40,45.1,42.2,50.2,43.6,45.1,36.6,43,
                       40,44,35,32.8,44,44.8,36.6,50,43,44,42.2,50.2,
                       43.6,45.1,39.6,50,43,34,38.4,58.5,44.3,40,39.6,
                       43,53.8,34,38.4,58.5,44.3,40,38.9,50,53.8,
                       50.3,55.9,51.3,68.2,34.2,38.9,50,43,50.3,55.9,51.3,
                       68.2,34.2,39.8,38.5,53.8,34,38.4,58.5,44.3,40,
                       39.8,38.5,45.1,50.3,55.9,51.3,68.2,34.2),
           y_tukey = c(307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,307046.3,307046.3,307046.3,307046.3,
                       307046.3,307046.3,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02,75.02,75.02,75.02,75.02,75.02,75.02,75.02,
                       75.02),
             Month = as.factor(c("Jul",
                                 "Jul","Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Jul","Jul","Jul","Aug","Aug","Aug","Sep",
                                 "Sep","Jul","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Jul","Jul","Jul","Aug",
                                 "Aug","Aug","Sep","Sep","Jul","Jul","Jul",
                                 "Aug","Aug","Aug","Sep","Sep","Jul","Jul",
                                 "Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Jul","Jul","Jul","Aug","Aug","Sep","Sep",
                                 "Sep","Jul","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Jul","Jul","Jul","Aug","Aug",
                                 "Sep","Sep","Sep","Jul","Jul","Jul",
                                 "Aug","Aug","Sep","Sep","Sep","Jul","Jul",
                                 "Jul","Aug","Aug","Sep","Sep","Sep","Jul",
                                 "Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Sep","Jul","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Jul","Jul","Jul","Aug","Aug",
                                 "Aug","Sep","Sep","Jul","Jul","Jul","Aug",
                                 "Aug","Aug","Sep","Sep","Jul","Jul",
                                 "Jul","Aug","Aug","Aug","Sep","Sep","Jul",
                                 "Jul","Jul","Aug","Aug","Aug","Sep","Sep",
                                 "Jul","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Jul","Jul","Jul","Aug","Aug",
                                 "Sep","Sep","Sep","Jul","Jul","Jul","Aug",
                                 "Aug","Aug","Sep","Sep","Jul","Jul","Jul",
                                 "Aug","Aug","Sep","Sep","Sep","Jul",
                                 "Jul","Jul","Aug","Aug","Sep","Sep","Sep",
                                 "Jul","Jul","Jul","Aug","Aug","Sep","Sep",
                                 "Sep","Jul","Jul","Aug","Aug","Aug",
                                 "Sep","Sep","Sep")),
           Letters = as.factor(c("b","b",
                                 "b","a","a","a","b","b","b","b","b","a",
                                 "a","a","b","b","b","b","b","a","a",
                                 "a","b","b","b","b","b","a","a","a",
                                 "b","b","b","b","b","a","a","a","b","b",
                                 "b","b","b","a","a","a","b","b","b",
                                 "b","b","a","a","b","b","b","b","b","b",
                                 "a","a","a","b","b","b","b","b","a",
                                 "a","b","b","b","b","b","b","a","a",
                                 "b","b","b","b","b","b","a","a","b","b",
                                 "b","b","b","a","a","a","b","b","b",
                                 "b","b","b","ab","ab","ab","a","a","b",
                                 "b","b","ab","ab","ab","a","a","b","b",
                                 "b","ab","ab","ab","a","a","b","b","b",
                                 "ab","ab","ab","a","a","b","b","b",
                                 "ab","ab","ab","a","a","b","b","b","ab",
                                 "ab","ab","a","a","b","b","b","ab","ab",
                                 "a","a","a","b","b","b","ab","ab",
                                 "ab","a","a","b","b","b","ab","ab","a",
                                 "a","a","b","b","b","ab","ab","a","a",
                                 "a","b","b","b","ab","ab","a","a","a",
                                 "b","b","ab","ab","ab","a","a","a"))
)

sample_data %>% 
    ggplot(aes(x = Month, y = Value, fill = Month)) +
    geom_boxplot() +
    geom_text(aes(y = y_tukey, label = Letters)) +
    scale_y_continuous(expand = c(0.03,0.03)) +
    facet_wrap(vars(Parameter), scales = "free_y", strip.position="left") +
    theme_bw() +
    theme(panel.grid.major = element_blank(),
          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, angle = 90, hjust = 1, vjust = 1),
          axis.text.y = element_text(colour="black", size = 9),
          axis.line = element_line(size = 0.5, colour = "black"))

Created on 2020-05-21 by the reprex package (v0.3.0)

Thanks Andres, That's what I was trying to do, but in this way doesn't look very good, it looks better the other way.

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