I tried to make a notched boxplot using matplotlib, but found the notched box tends to overextend and then fold back on itself. This does not happen when I make a regular boxplot.
This can be seen with the following code and the resulting plot that gets generated:
import matplotlib.pyplot as plt
data = [[-0.056, -0.037, 0.010, 0.077, 0.082],
[-0.014, 0.021, 0.051, 0.073, 0.079]]
# Set 2 plots with vertical layout (1 on top of other)
fig, (ax1, ax2) = plt.subplots(2, 1, sharex=True)
ax1.boxplot(data, 1) #Notched boxplot
ax2.boxplot(data, 0) #Standard boxplot
It means that the distribution of the data is skewed. If two boxes' notches do not overlap, there is 95% confidence their medians differ.
Maybe, you can alter the
bootstrap parameter of the
boxplot to tighten up the median's confidence interval.