In theory the violinplot of vioplot package is a boxplot + density function.
In the "boxplot part",
the black box corresponds to the IQR (indeed, see below), and
the midline should correspond to the same range (adjacent values, default 1.5 IQR), yet it is not (see below). Anyone can explain why are they different?
require("vioplot") a = rnorm(100) range (a) a = c(a,2,8,2.9,3,4, -3, -5) # add some outliers par ( mfrow = c(1,2)) boxplot(a, range=1.5) vioplot(a, range=1.5 )
Benerated by above: