Skip to content

Show raw points instead of sparse violins

baddistributionsmechanicalWilke 2019 p. 85

How many observations support each treatment group, and is there an outlier in Dose A?

Synthetic small-sample experiment (n = 8 observations per group) for illustrating sparse violin density artifacts.

“Violin plots can give the impression of dense, smooth distributions even when drawn from only a handful of points”

Claus O. Wilke, "Fundamentals of Data Visualization", p. 84.

Also covered in Wilke 2019 (9 Visualizing Many Distributions at Once, p. 85).

CVD preview

Before

Smooth violin shapes constructed from 8 observations per group imply continuous density and obscure the single high outlier in Dose A.

Download before Python code

After

Plotting all 8 individual points with horizontal median bars exposes the sample size and shows the single 21.5 outlier directly.

Download after Python code

Values

Medians rise from 13.2 (Control) to 16.0 (Dose A) and 17.8 (Dose B), with one Dose A point at 21.5.

Each group contains 8 measurements, and Dose A carries one clear high value at 21.5.

Values used in both charts
GroupnMedian responseMinMax
Control813.211.215.6
Dose A81613.121.5
Dose B817.815.220.1