@@ -3835,85 +3835,45 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3835
3835
A list of dictionaries containing stats for each boxplot.
3836
3836
Required keys are:
3837
3837
3838
- - ``med``: The median (scalar float).
3839
-
3840
- - ``q1``: The first quartile (25th percentile) (scalar
3841
- float).
3842
-
3843
- - ``q3``: The third quartile (75th percentile) (scalar
3844
- float).
3845
-
3846
- - ``whislo``: Lower bound of the lower whisker (scalar
3847
- float).
3848
-
3849
- - ``whishi``: Upper bound of the upper whisker (scalar
3850
- float).
3838
+ - ``med``: Median (scalar).
3839
+ - ``q1``, ``q3``: First & third quartiles (scalars).
3840
+ - ``whislo``, ``whishi``: Lower & upper whisker positions (scalars).
3851
3841
3852
3842
Optional keys are:
3853
3843
3854
- - ``mean``: The mean (scalar float). Needed if
3855
- ``showmeans=True``.
3856
-
3857
- - ``fliers``: Data beyond the whiskers (sequence of floats).
3844
+ - ``mean``: Mean (scalar). Needed if ``showmeans=True``.
3845
+ - ``fliers``: Data beyond the whiskers (array-like).
3858
3846
Needed if ``showfliers=True``.
3859
-
3860
- - ``cilo`` & ``cihi``: Lower and upper confidence intervals
3847
+ - ``cilo``, ``cihi``: Lower & upper confidence intervals
3861
3848
about the median. Needed if ``shownotches=True``.
3862
-
3863
- - ``label``: Name of the dataset (string). If available,
3849
+ - ``label``: Name of the dataset (str). If available,
3864
3850
this will be used a tick label for the boxplot
3865
3851
3866
3852
positions : array-like, default: [1, 2, ..., n]
3867
3853
The positions of the boxes. The ticks and limits
3868
3854
are automatically set to match the positions.
3869
3855
3870
- widths : array-like, default: None
3871
- Either a scalar or a vector and sets the width of each
3872
- box. The default is ``0.15*(distance between extreme
3873
- positions)``, clipped to no less than 0.15 and no more than
3874
- 0.5.
3856
+ widths : float or array-like, default: None
3857
+ The widths of the boxes. The default is
3858
+ ``clip(0.15*(distance between extreme positions), 0.15, 0.5)``.
3875
3859
3876
3860
vert : bool, default: True
3877
- If `True` (default), makes the boxes vertical. If `False`,
3878
- makes horizontal boxes.
3861
+ If `True` (default), makes the boxes vertical.
3862
+ If `False`, makes horizontal boxes.
3879
3863
3880
3864
patch_artist : bool, default: False
3881
3865
If `False` produces boxes with the `.Line2D` artist.
3882
3866
If `True` produces boxes with the `~matplotlib.patches.Patch` artist.
3883
3867
3884
- shownotches : bool, default: False
3885
- If `False` (default), produces a rectangular box plot.
3886
- If `True`, will produce a notched box plot
3887
-
3888
- showmeans : bool, default: False
3889
- If `True`, will toggle on the rendering of the means
3890
-
3891
- showcaps : bool, default: True
3892
- If `True`, will toggle on the rendering of the caps
3893
-
3894
- showbox : bool, default: True
3895
- If `True`, will toggle on the rendering of the box
3896
-
3897
- showfliers : bool, default: True
3898
- If `True`, will toggle on the rendering of the fliers
3899
-
3900
- boxprops : dict or None (default)
3901
- If provided, will set the plotting style of the boxes
3902
-
3903
- whiskerprops : dict or None (default)
3904
- If provided, will set the plotting style of the whiskers
3905
-
3906
- capprops : dict or None (default)
3907
- If provided, will set the plotting style of the caps
3908
-
3909
- flierprops : dict or None (default)
3910
- If provided will set the plotting style of the fliers
3868
+ shownotches, showmeans, showcaps, showbox, showfliers : bool
3869
+ Whether to draw the CI notches, the mean value (both default to
3870
+ False), the caps, the box, and the fliers (all three default to
3871
+ True).
3911
3872
3912
- medianprops : dict or None (default)
3913
- If provided, will set the plotting style of the medians
3914
-
3915
- meanprops : dict or None (default)
3916
- If provided, will set the plotting style of the means
3873
+ boxprops, whiskerprops, capprops, flierprops, medianprops, meanprops :\
3874
+ dict, optional
3875
+ Artist properties for the boxes, whiskers, caps, fliers, medians, and
3876
+ means.
3917
3877
3918
3878
meanline : bool, default: False
3919
3879
If `True` (and *showmeans* is `True`), will try to render the mean
@@ -3935,28 +3895,19 @@ def bxp(self, bxpstats, positions=None, widths=None, vert=True,
3935
3895
of the `.Line2D` instances created. That dictionary has the
3936
3896
following keys (assuming vertical boxplots):
3937
3897
3938
- - ``boxes``: the main body of the boxplot showing the
3939
- quartiles and the median's confidence intervals if
3940
- enabled.
3941
-
3898
+ - ``boxes``: main bodies of the boxplot showing the quartiles, and
3899
+ the median's confidence intervals if enabled.
3942
3900
- ``medians``: horizontal lines at the median of each box.
3943
-
3944
- - ``whiskers``: the vertical lines extending to the most
3945
- extreme, non-outlier data points.
3946
-
3947
- - ``caps``: the horizontal lines at the ends of the
3948
- whiskers.
3949
-
3950
- - ``fliers``: points representing data that extend beyond
3951
- the whiskers (fliers).
3952
-
3901
+ - ``whiskers``: vertical lines up to the last non-outlier data.
3902
+ - ``caps``: horizontal lines at the ends of the whiskers.
3903
+ - ``fliers``: points representing data beyond the whiskers (fliers).
3953
3904
- ``means``: points or lines representing the means.
3954
3905
3955
3906
Examples
3956
3907
--------
3957
3908
.. plot:: gallery/statistics/bxp.py
3958
-
3959
3
4E6B
909
"""
3910
+
3960
3911
# lists of artists to be output
3961
3912
whiskers = []
3962
3913
caps = []
0 commit comments