7
$\begingroup$

I would like to represent my data in the most informative way. As successors of the boxplot, I have found violin plots as well as beanplots. What are the advantages of each plot? A violin plot could be combined with a boxplot:

Violin plot from JASP

A beanplot could be combined with the mean and a HDI around it, as seen in the pirateplot() function:

enter image description here

What is the difference? What would you prefer?

$\endgroup$
2
  • 1
    $\begingroup$ Do we have to choose? I don't like either much. Why not broaden your question to allow suggestions of other possibilities and post your data so that there can be different answers? The example data, whether they are yours or not, show how both plots impute and suggest structure that may not be possessed by the underlying data. For example, the suggested extremes are projections beyond the actual extremes. $\endgroup$
    – Nick Cox
    Commented Sep 1, 2016 at 12:15
  • $\begingroup$ There is also granularity to your data that may or may not be important. Can you comment? Multiples of 0.25? $\endgroup$
    – Nick Cox
    Commented Sep 1, 2016 at 12:17

1 Answer 1

7
$\begingroup$

I don't know about bean plots but for small sample sizes violin plots may be unstable and I would prefer to just show the raw data with a rug plot or spike histogram. Sometimes I superimpose a violin plot with an extended box plot and the raw data. An extended box plot shows many more quantiles than a regular box plot. In R you can see a demonstration of many variations by running

require(Hmisc)
example(panel.bpplot)

See also some of the examples in https://hbiostat.org/bbr/descript.html#sec-descript-graphics

See http://biostat.app.vumc.org/HmiscNew for other examples of back-to-back violin plots for displaying distributions for two treatment groups over time. No need to always show the mirror images.

$\endgroup$
2
  • 1
    $\begingroup$ links are dead. it's better to include images directly so they aren't lost like this $\endgroup$
    – endolith
    Commented Jul 11, 2022 at 5:25
  • 1
    $\begingroup$ Links have been updated $\endgroup$ Commented Jul 11, 2022 at 12:30

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.