So i want to add the min, 25.pc, median, 75. pc and max to a boxplot in ggplot with one variable. For the purpose of an example I will describe the problem with the mtcars dataset. I saw another thread with a similar question: annotate boxplot in ggplot2 and I tried to replicate the answer from the user eipi10. But the process failed with just one variable. Somehow the quantile function gives other output. It shows the value of each single data point in the variable in the plot.
library(ggplot2)
ggplot(mtcars, aes(x = mpg) +
geom_boxplot(width = 0.6) +
stat_summary(geom = "text", fun = quantile,
aes(label = ..x.., y = 0.1), size = 3.5)
even if I change the probs argument from the quantile function and give it to the stat_summary() function it displays weird results.

