Skip to content

DOC: clarified docstring for cbook.boxplot_stats #2819

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 25, 2014
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
DOC: formatted key-value list as a table and added some latex math
  • Loading branch information
phobson committed Feb 17, 2014
commit 5ba30aadab2ce43f2d797777cf7ebf012f8ea96e
29 changes: 18 additions & 11 deletions lib/matplotlib/cbook.py
Original file line number Diff line number Diff line change
Expand Up @@ -1884,22 +1884,29 @@ def boxplot_stats(X, whis=1.5, bootstrap=None, labels=None):
-------
bxpstats : A list of dictionaries containing the results for each column
of data. Keys of each dictionary are the following:
- label = tick label for the boxplot
- mean = mean value (can plot as a line or point)
- median = 50th percentile
- q1 = first quartile (25th pctl)
- q3 = third quartile (75 (pctl)
- cilo = lower notch around the median
- ciho = upper notch around the median
- whislo = end of the lower whisker
- whishi = end of the upper whisker
- fliers = outliers

======== ===================================
Key Value Description
======== ===================================
label tick label for the boxplot
mean arithemetic mean value
median 50th percentile
q1 first quartile (25th percentile)
q3 third quartile (75th percentile)
cilo lower notch around the median
ciho upper notch around the median
whislo end of the lower whisker
whishi end of the upper whisker
fliers outliers
======== ===================================


Notes
-----
Non-bootstrapping approach to confidence interval uses Gaussian-based
asymptotic approximation.
asymptotic approximation:

.. math:: \mathrm{med} \pm 1.57 \times \frac{\mathrm{iqr}}{\sqrt{N}}

General approach from:
McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of
Expand Down