# Decide the order of groups in the argument levels iris$Species <- factor(iris$Species, levels = c("virginica", "versicolor", "setosa")) ggboxplot(iris, x = "Species", y = "Sepal.Length")