diff --git a/lib/matplotlib/cbook.py b/lib/matplotlib/cbook.py index df217258ec14..f990e597682f 100644 --- a/lib/matplotlib/cbook.py +++ b/lib/matplotlib/cbook.py @@ -1954,11 +1954,15 @@ def _compute_conf_interval(data, med, iqr, bootstrap): elif len(labels) != ncols: raise ValueError("Dimensions of labels and X must be compatible") + input_whis = whis for ii, (x, label) in enumerate(zip(X, labels), start=0): # empty dict stats = {} stats['label'] = label + # restore whis to the input values in case it got changed in the loop + whis = input_whis + # arithmetic mean stats['mean'] = np.mean(x)