6
$\begingroup$

Bar charts with error whiskers, like the one below (taken from What type of plot is it?), seem to be quite common in some communities.

sample bar chart with whiskers

I wonder, however, why is a bar chart used, and not a box plot? For pure values without uncertainties (i.e., when we wouldn't use the whiskers) I can see that bar charts are cleaner and easier to comprehend. But, box plots offer much more information about data spread, uncertainties, etc.

So, is there a good reason speaking in favour of bar charts with whiskers?

$\endgroup$
6
  • 2
    $\begingroup$ Boxplots don't lend themselves to making the comparisons implied by this chart (namely, formal tests of differences of means). $\endgroup$
    – whuber
    Commented Oct 5, 2022 at 17:34
  • 1
    $\begingroup$ The very same plot appears at stats.stackexchange.com/questions/591170, which includes more information about its source. $\endgroup$
    – whuber
    Commented Oct 5, 2022 at 22:29
  • $\begingroup$ Incidentally, violin plots (also known as bean plots) convey much more information than boxplots. (If need be, you can overlay a box plot over a violin plot, or even add the individual observations if there are not too many of them - for the small numbers involved here, I would definitely try that and see whether it works well.) $\endgroup$ Commented Oct 6, 2022 at 6:12
  • 2
    $\begingroup$ Three excellent answers to date. I want to flag generally the existence of even more negative views from some statisticians. often to be found by Googling one or more depreciatory terms detonator plot, dynamite plot or plunger plot. For example, simplystatistics.org/posts/2019-02-21-dynamite-plots-must-die and biostat.app.vumc.org/wiki/Main/DynamitePlots I find box plots often oversold, especially for discrete data, or equivalently data with just a few distinct values, where their logic often defeats users, and gives rise to many puzzled threads on this site. $\endgroup$
    – Nick Cox
    Commented Oct 6, 2022 at 6:39
  • 1
    $\begingroup$ It's remarkable how many texts (and one has to guess courses too) advise supplementing analysis of variance with a look at box plots. Looking at graphs of distributions beats not looking at them, but as already mentioned in answers at the minimum the box plots should show means too. $\endgroup$
    – Nick Cox
    Commented Oct 6, 2022 at 6:43

3 Answers 3

9
$\begingroup$

Realistically, the reason people do most of the things they do, is tradition / habit. 'Such-and-such is what I learned in graduate school, it's what I've always done, it's what everyone else in my field does, it's what reviewers / editors / readers will expect and understand readily.'


Having said that, we can ask if there is any better justification for bar charts with error bars over boxplots. I agree that boxplots do show more information on the whole, but something can be said for bar charts:

  1. People are typically interested in group means. Bar charts display means directly. Boxplots, by default, do not display means, although they can be augmented to do so.
  2. People are typically interested in inferences about means. The error bars on bar charts, while they can be tricky in some cases, do display information that is relevant to the inference about the means. Boxplots, by default, do not, although they can be augmented to do so.
  3. People are not typically primarily interested in various quantiles. Boxplots make it easy to see the median and quartiles, and the minimum and maximum values. I think these are interesting, but they are typically not what researchers are theorizing about. Bar charts do not display this information, which people might consider extraneous and adding 'clutter' to the display. (I don't really agree with that take, but I'm well aware that many people hold it.)

In short, bar charts display what most end users want to see, and not what they don't. It's the opposite for boxplots, although I do wish these attitudes were less prevalent.

$\endgroup$
1
  • 5
    $\begingroup$ Nb, I have made boxplots for people and had them say, 'can you just make me a barchart?' :/ $\endgroup$ Commented Oct 5, 2022 at 17:24
9
$\begingroup$

Personally, I have never encountered a good use case for bar plots and think it's mostly inertia in some fields that leads to their continued use.

  1. If you like Tufte's ideas about data-ink ratios, it's clear that they take up far too much plot area to convey quite little information. All the information in the bar can be communicated with a point.
  2. One-sided error bars also don't offer much leeway for communicating asymmetric errors/confidence intervals. Two-way error bars are less clear because of overlap with the bar itself.
  3. Since the information is contained in the height, you need to be especially careful about the starting value and the scale for the Y-axis. I'd say that starting at zero and linear scales are generally more important for easy and intuitive interpretation of barplots than alternatives such as dot charts.

There's probably one feature that supporters would claim makes them superior, which is the ability to use shading/texture in the bar to distinguish between categories. I don't think this is a particularly strong point, but it's the only defence I can think of.

That said, in many circumstances, they are not actively harmful and non-statisticians seem to find them visually appealing, so they tend to persist.

I would add that though boxplots communicate more information, they also have weaknesses and can sometimes mislead. If you're summarising just a few data points, it's better to just plot the raw data, possibly with some jittering or transparency. Other options include histograms, violin plots, and dot charts/beeswarm plots.

$\endgroup$
1
  • 3
    $\begingroup$ Great answer. I frequently tell people "bar charts are for people who spend too much time in bars, and box charts are for people who spend too much time in boxes". This intentionally confuses them, and by design, it finally gets them thinking about their choices. ;) $\endgroup$ Commented Oct 7, 2022 at 2:00
5
$\begingroup$

Boxplots (and violin plots, which I prefer because they convey more information, and the raw observations themselves) visualize observations and summary information of the observations. Barplots, as used in these communities, visualize parameter estimates. Typically, as in the example you give, the estimate is simply the group mean, so there actually is little difference, and the choice is down to a community's traditions and expectations.

However, suppose there is one grouping factor, and also one numerical covariate. Boxplots or violin plots can plot the data and their means per group. But we would lose the information about the covariate. A simple way of giving a visual summary would be to plot three bars per group: one with the estimated response within the group with the covariate at its 25% quantile, one with the covariate at its median and one with the covariate at its 75%. In each case, we can also add a whisker to show the standard error of the estimate. Note that boxplots can't convey this kind of information.

However, I would still say that a simple dot with whiskers would still be superior to the bar plot, if only because of the within-the-bar-bias that barplots induce. And in any case, one must note in the figure caption what the whiskers refer to - are they the estimate plus one standard error of the estimate (e.g., SEM), or plus two standard errors, or are they the standard deviation of the raw data being plotted, or what?

$\endgroup$
3
  • 1
    $\begingroup$ (+1) About your first sentence: it may not be standard, but it seems to me that Bayesian posteriors could easily (and helpfully) be visualised with violin plots, so they need not be restricted to observations. $\endgroup$
    – mkt
    Commented Oct 6, 2022 at 8:56
  • $\begingroup$ "Boxplots ... visualize ... summary information of the observations": But the mean and the standard deviation (of the sample) are summary information, too, aren't they? $\endgroup$
    – Igor F.
    Commented Oct 6, 2022 at 10:09
  • 1
    $\begingroup$ Yes, they are. But they are observation-derived, not model-derived. A dotchart (and its worse analogue, the barplot) can also plot model-derived quantities. You could also plot regression coefficient estimates and their standard errors using dotcharts/barplots, but you can't use boxplots for that. $\endgroup$ Commented Oct 6, 2022 at 10:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.