Using the iris
data:
require(ggplot2)
ggplot(iris, aes(Species, Sepal.Length)) +
geom_violin(draw_quantiles = c(0.25, 0.5, 0.75))
How can I keep the straight line for the means but use dashed lines instead for the other two quantiles ?
I have used the very handy function of @jan-glx for my own data here: Split violin plot with ggplot2 , but I honestly don't understand everything in this code. Plus it seems to be automatic in python according to this link https://seaborn.pydata.org/generated/seaborn.violinplot.html , but I only work with R.
And if I compute this :
ggplot(iris, aes(Species, Sepal.Length)) +
geom_violin(draw_quantiles = c(0.25, 0.5, 0.75),
linetype = "dashed")
I get all the lines in dashed
type :
Thank you for your help