Why is ggplot2 boxplot different? #777

hadley opened this Issue Mar 8, 2013 · 1 comment

2 participants

x <- c(8.9, 8.19, 8.16, 8.12, 8.09, 8.02, 7.97, 7.94, 7.94, 7.93, 7.9, 7.89, 7.71, 7.66, 7.51, 7.44)
ggplot2::qplot(factor(0), x, geom = "boxplot")

note the lower outlier.

(Reported by Antony Unwin)

wch commented Mar 8, 2013

From the geom_boxplot help page:

The upper and lower "hinges" correspond to the first and third quartiles (the 25th and 75th percentiles). This differs slightly from the method used by the ‘boxplot’ function, and may be apparent with small samples. See ‘boxplot.stats’ for for more information on how hinge positions are calculated for ‘boxplot’.

@hadley hadley closed this Feb 24, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment