Here is the code:
library(ggplot2)
library(RVAideMemoire)
library(ggpubr)
library(ggstatsplot)
iris.table <- iris
ggstatsplot::ggbetweenstats(data = iris.table, x = Species, y = Sepal.Length, plot.type = "box", type = "parametric",
ggsignif.args = list(textsize = 4.5, tip_length = 0.01),
k = 3,
outlier.tagging = FALSE,
mean.plotting = FALSE,
xlab = "Species",
ylab = "Sepal Length",
ggstatsplot.layer = FALSE,
pairwise.comparisons = TRUE,
pairwise.display = "significant", p.adjust.method = "BH",
point.args = list(position = ggplot2::position_jitterdodge(dodge.width = 0.15),
size = 1.5, stroke = 0))+
ggplot2::scale_color_manual(values = c("black", "black", "black"))+
scale_x_discrete(labels = c("Iris setosa", "Iris versicolor", "Iris virginica"))+
theme(text = element_text(size=13),
axis.text.x = element_text(size = 12),
axis.text = element_text(size = 13),
axis.text.y = element_text(size = 12),
plot.caption = element_text(size = 13),
plot.subtitle = element_text(size = 13))
which gives this: