@@ -1870,37 +1870,39 @@ def delete_masked_points(*args):
1870
1870
def boxplot_stats (X , whis = 1.5 , autorange = False , bootstrap = None ,
1871
1871
labels = None ):
1872
1872
"""
1873
- Returns list of dictionaries of staticists to be use to draw a
1874
- series of box and whisker plots. See the `Returns` section below to
1875
- the required keys of the dictionary. Users can skip this function
1876
- and pass a user-defined set of dictionaries to the new `axes.bxp`
1877
- method instead of relying on MPL to do the calcs .
1873
+ Returns list of dictionaries of statistics used to draw a series
1874
+ of box and whisker plots. See the `Returns` section below to the
1875
+ required keys of the dictionary. Users can skip this function and
1876
+ pass a user-defined set of dictionaries to the new `axes.bxp` method
1877
+ instead of relying on MPL to do the calculations .
1878
1878
1879
1879
Parameters
1880
1880
----------
1881
1881
X : array-like
1882
- Data that will be represented in the boxplots. Should have 2 or fewer
1883
- dimensions.
1884
-
1882
+ Data that will be represented in the boxplots. Should have 2 or
1883
+ fewer dimensions.
1885
1884
whis : float, string, or sequence (default = 1.5)
1886
- As a float, determines the reach of the whiskers past the first and
1887
- third quartiles (e.g., Q3 + whis*IQR, QR = interquartile range, Q3-Q1).
1888
- Beyond the whiskers, data are considered outliers and are plotted as
1889
- individual points. Set this to an unreasonably high value to force the
1890
- whiskers to show the min and max data. Alternatively, set this to an
1891
- ascending sequence of percentile (e.g., [5, 95]) to set the whiskers
1892
- at specific percentiles of the data. Finally, can `whis` be the
1893
- string 'range' to force the whiskers to the min and max of the data.
1894
- In the edge case that the 25th and 75th percentiles are equivalent,
1895
- `whis` will be automatically set to 'range'
1896
-
1897
- bootstrap : int or None (default)
1898
- Number of times the confidence intervals around the median should
1899
- be bootstrapped (percentile method).
1900
-
1901
- labels : sequence
1902
- Labels for each dataset. Length must be compatible with dimensions
1903
- of `X`
1885
+ As a float, determines the reach of the whiskers past the first
1886
+ and third quartiles (e.g., Q3 + whis*IQR, QR = interquartile
1887
+ range, Q3-Q1). Beyond the whiskers, data are considered outliers
1888
+ and are plotted as individual points. This can be set this to an
1889
+ ascending sequence of percentile (e.g., [5, 95]) to set the
1890
+ whiskers at specific percentiles of the data. Finally, `whis`
1891
+ can be the string ``'range'`` to force the whiskers to the
1892
+ minimum and maximum of the data. In the edge case that the 25th
1893
+ and 75th percentiles are equivalent, `whis` can be automatically
1894
+ set to ``'range'`` via the `autorange` option.
1895
+ autorange : bool, optional (False)
1896
+ When `True` and the data are distributed such that the 25th and
1897
+ 75th percentiles are equal, ``whis`` is set to ``'range'`` such
1898
+ that the whisker ends are at the minimum and maximum of the
1899
+ data.
1900
+ bootstrap : int, optional
1901
+ Number of times the confidence intervals around the median
1902
+ should be bootstrapped (percentile method).
1903
+ labels : array-like, optional
1904
+ Labels for each dataset. Length must be compatible with
1905
+ dimensions of `X`.
1904
1906
1905
1907
Returns
1906
1908
-------
@@ -1925,8 +1927,8 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None,
1925
1927
1926
1928
Notes
1927
1929
-----
1928
- Non-bootstrapping approach to confidence interval uses Gaussian-based
1929
- asymptotic approximation:
1930
+ Non-bootstrapping approach to confidence interval uses Gaussian-
1931
+ based asymptotic approximation:
1930
1932
1931
1933
.. math::
1932
1934
@@ -1936,7 +1938,7 @@ def boxplot_stats(X, whis=1.5, autorange=False, bootstrap=None,
1936
1938
McGill, R., Tukey, J.W., and Larsen, W.A. (1978) "Variations of
1937
1939
Boxplots", The American Statistician, 32:12-16.
1938
1940
1939
- '''
1941
+ """
1940
1942
1941
1943
def _bootstrap_median (data , N = 5000 ):
1942
1944
# determine 95% confidence intervals of the median
0 commit comments