Boxplot defaults, what does the box represent?

I have created a plot eg:

plot <- ggplot(data, aes(x = type, y = size, fill = type)) + geom_boxplot + geom_dotplot(binaxis = 'y', stackdir = 'center') + scale_fill_maual(values=c("blue","red","yellow"))

I have used the default settings here. Please could someone recommend where I could find out what the default setting are so I know if the box represents IQR and whether the whiskers represent SE or 95% CI?

Many thanks.

The documentation is here:

Just expanding on @martin.R's answer to point you to the Summary Statistics section (quoted below).

If you're new to R help pages, you might also want to check out the handy visual guide to reading them by Kieran Healy here.

The lower and upper 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() .

The upper whisker extends from the hinge to the largest value no further than 1.5 * IQR from the hinge (where IQR is the inter-quartile range, or distance between the first and third quartiles). The lower whisker extends from the hinge to the smallest value at most 1.5 * IQR of the hinge. Data beyond the end of the whiskers are called "outlying" points and are plotted individually.

In a notched box plot, the notches extend 1.58 * IQR / sqrt(n) . This gives a roughly 95% confidence interval for comparing medians. See McGill et al. (1978) for more details.

This is followed by an explanation of how to control the parameters to your liking.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.