Skip to content

Commit

Permalink
BUG : fixes whis over-writing in boxplot_stats
Browse files Browse the repository at this point in the history
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
  • Loading branch information
tacaswell committed Sep 18, 2014
1 parent d10e26e commit a4e3773
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lib/matplotlib/cbook.py
Expand Up @@ -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 incase in got changed
whis = input_whis

# arithmetic mean
stats['mean'] = np.mean(x)

Expand Down

0 comments on commit a4e3773

Please sign in to comment.