Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 46f0d4b

Browse files
committed
BUG : fixes whis over-writing in boxplot_stats
Restore the value of `whis` to the input value at the top of each pass through the for-loop. @WeatherGod hit the nail on the head. closes #3468
1 parent d10e26e commit 46f0d4b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/matplotlib/cbook.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1954,11 +1954,15 @@ def _compute_conf_interval(data, med, iqr, bootstrap):
19541954
elif len(labels) != ncols:
19551955
raise ValueError("Dimensions of labels and X must be compatible")
19561956

1957+
input_whis = whis
19571958
for ii, (x, label) in enumerate(zip(X, labels), start=0):
19581959
# empty dict
19591960
stats = {}
19601961
stats['label'] = label
19611962

1963+
# restore whis to the input values in case it got changed in the loop
1964+
whis = input_whis
1965+
19621966
# arithmetic mean
19631967
stats['mean'] = np.mean(x)
19641968

0 commit comments

Comments
 (0)