2
$\begingroup$

I have a distribution than has an extremely wide range but has a gaussian shaped narrow peak inside of it. If I plot this data with boxplots I get a small box with small whiskers and many outliers of both sides of the whiskers. The length of the boxplot plus whiskers is only 10% of the actual data range.

How should I deal with visualizing this sort of data? I feel boxplots are not well suited for this. But since I want to compare this data with other datasets that do not have that many outliers, I would like to still use the boxplot for visual comparison.

$\endgroup$
5
  • 1
    $\begingroup$ It sounds like the boxplot is working well. Could you explain what kind of comparison you want to make? $\endgroup$ – whuber May 18 at 16:17
  • $\begingroup$ By comparison I mean that I have measurement data from the same model under different conditions, that I want to compare. Most of the conditions result in a normal distribution without many outliers. But one condition results in this wide range distribution with one peak, giving this many outliers. But since I want to compare all conditions, I have chosen boxplots for easy visualization. $\endgroup$ – Lemonbonbon May 18 at 16:23
  • 2
    $\begingroup$ Superimposition or juxtaposition of median-quartile boxes and quantile plots allows attention to detail (e.g. in distribution tails); reduces arbitrary decisions about which data points are shown separately, or how and how much densities are smoothed; and avoids jittering, which does not always work well. A search for quantile-box will find several examples on CV e.g. stats.stackexchange.com/questions/181501/… $\endgroup$ – Nick Cox May 18 at 17:05
  • $\begingroup$ Not an answer, just something to consider: if you have very extreme outliers, it might be that you would be better to work on a log scale. This is the norm e.g. for some kinds of environmental data. $\endgroup$ – Silverfish May 18 at 20:46
  • $\begingroup$ (I have edited the title of the question to make it clearer what the question is about. If you think my change is misleading feel free to revert my change, or perhaps change it to something you think would be even clearer.) $\endgroup$ – Silverfish May 18 at 20:47
4
$\begingroup$

Beanplots, also known as violin plots, visualize much more information than boxplots. You can even overlay a boxplot on top of a beanplot. And if you do not have too many data points, then consider plotting all of them, possibly jittered (horizontally or vertically, as appropriate). Just ensure that if you plot both the raw points and the boxplot, your boxplot does not plot the outliers separately (in which case they get plotted twice).

beanplot

R code:

library(beanplot)
set.seed(1)
xx <- c(rnorm(1e2),rexp(20,.1))
beanplot(xx,what=c(0,1,0,0),col="lightgray",las=1)
boxplot(xx,add=TRUE,outline=FALSE,yaxt="n")
points(1+runif(length(xx),-.1,.1),xx,pch=19,cex=0.6)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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