# Violin plot

The violin plot (Hintze & Nelson 1998), combines the box-and-whisker plot (Tukey, 1977) and a data density trace into one diagram. The density trace supplements traditional summary statistics by graphically showing more detailed distributional characteristics of the data. MedCalc smooths the density trace using a kernel density estimator.

The violin plot is wider in sections where there are more data and more narrow in sections where there are less data.

Like box plots, violin plots nicely ilustrate differences between distributions of variables, or between subcategories of one or more variables; but only when the ranges of the distributions are not too different.

## Required input

### Data model

**1 continuous and 1 categorical variable**: select this option when you have one continuous variable and one variable that defines a subgroup classification, for example:**1 continuous and 2 categorical variables**: select this option when you have one continuous variable and two variables that define 2 classifications, for example:**n continuous variables without subgroups**: select this option when you have several continuous variable, without subgroups, for example:**n continuous and 1 categorical variable**: select this option when you have several continuous variables and one variable that defines a subgroup classification, for example:

### Variables

- Select the variables of interest.
- Optionally select a filter to include a subset of cases.

### Options

- If the data require a logarithmic transformation (e.g. when the data are positively skewed), select the Logarithmic transformation option.
- Box-and-whisker: include small box-and-whisker plots
- Notched box-and-whisker: in this variation of the box-and-whisker plot (McGill et al, 1978) confidence intervals for the medians are provided by means of notches surrounding the medians. If the notches about two medians do not overlap, the medians are significantly different at a ± 95% confidence level.
- Markers: includes all the data points in the graph. This option is very useful since in this case the graph has the advantage not to conceal the real data.

## Literature

- Hintze JL, Nelson RD (1998) Violin Plots: A Box Plot-Density Trace Synergism. The American Statistician 52:181-184.
- McGill R, Tukey JW, Larsen WA (1978) Variations of box plots. The American Statistician, 32, 12-16.
- Tukey JW (1977) Exploratory data analysis. Reading, Mass: Addison-Wesley Publishing Company.

## See also

## Link

Go to Violin plot.