# NOT RUN {
library(ggplot2)
library(see)
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violinhalf() +
theme_modern() +
scale_fill_material_d()
# To flip all half-violin geoms, use `flip = TRUE`:
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violinhalf(flip = TRUE) +
theme_modern() +
scale_fill_material_d()
# To flip the half-violin geoms for the first and third groups only
# by passing a numeric vector
ggplot(iris, aes(x = Species, y = Sepal.Length, fill = Species)) +
geom_violinhalf(flip = c(1,3)) +
theme_modern() +
scale_fill_material_d()
# }
Run the code above in your browser using DataLab