I want to make a violin plot using geom_violin that mimics the structure of violin plots. i.e. it shows 95% confidence interval, interquartile range and median within the desnity plots.
I am trying to do this but only getting median points and error.
p <- ggplot(df2, aes(x = col1, y = col2, fill = col1)) +
geom_violin(scale = "width")
p + geom_pointrange(mapping = aes(x = col1, y = col2), stat = "summary" ,fun.ymax = max, fun.ymin = min, fun.y = median)
but I am getting this error:
Warning message: Ignoring unknown parameters: fun.ymax, fun.ymin, fun.y
Any help would be appreciated. Thanks.