MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / bxp

Method bxp

lib/matplotlib/axes/_axes.py:4642–5015  ·  view source on GitHub ↗

Draw a box and whisker plot from pre-computed statistics. The box extends from the first quartile *q1* to the third quartile *q3* of the data, with a line at the median (*med*). The whiskers extend from *whislow* to *whishi*. Flier points are markers past th

(self, bxpstats, positions=None, widths=None, vert=None,
            orientation='vertical', patch_artist=False, shownotches=False,
            showmeans=False, showcaps=True, showbox=True, showfliers=True,
            boxprops=None, whiskerprops=None, flierprops=None,
            medianprops=None, capprops=None, meanprops=None,
            meanline=False, manage_ticks=True, zorder=None,
            capwidths=None, label=None)

Source from the content-addressed store, hash-verified

4640
4641 @_api.make_keyword_only("3.10", "widths")
4642 def bxp(self, bxpstats, positions=None, widths=None, vert=None,
4643 orientation='vertical', patch_artist=False, shownotches=False,
4644 showmeans=False, showcaps=True, showbox=True, showfliers=True,
4645 boxprops=None, whiskerprops=None, flierprops=None,
4646 medianprops=None, capprops=None, meanprops=None,
4647 meanline=False, manage_ticks=True, zorder=None,
4648 capwidths=None, label=None):
4649 """
4650 Draw a box and whisker plot from pre-computed statistics.
4651
4652 The box extends from the first quartile *q1* to the third
4653 quartile *q3* of the data, with a line at the median (*med*).
4654 The whiskers extend from *whislow* to *whishi*.
4655 Flier points are markers past the end of the whiskers.
4656 See https://en.wikipedia.org/wiki/Box_plot for reference.
4657
4658 .. code-block:: none
4659
4660 whislow q1 med q3 whishi
4661 |-----:-----|
4662 o |--------| : |--------| o o
4663 |-----:-----|
4664 flier fliers
4665
4666 .. note::
4667 This is a low-level drawing function for when you already
4668 have the statistical parameters. If you want a boxplot based
4669 on a dataset, use `~.Axes.boxplot` instead.
4670
4671 Parameters
4672 ----------
4673 bxpstats : list of dicts
4674 A list of dictionaries containing stats for each boxplot.
4675 Required keys are:
4676
4677 - ``med``: Median (float).
4678 - ``q1``, ``q3``: First & third quartiles (float).
4679 - ``whislo``, ``whishi``: Lower & upper whisker positions (float).
4680
4681 Optional keys are:
4682
4683 - ``mean``: Mean (float). Needed if ``showmeans=True``.
4684 - ``fliers``: Data beyond the whiskers (array-like).
4685 Needed if ``showfliers=True``.
4686 - ``cilo``, ``cihi``: Lower & upper confidence intervals
4687 about the median. Needed if ``shownotches=True``.
4688 - ``label``: Name of the dataset (str). If available,
4689 this will be used a tick label for the boxplot
4690
4691 positions : array-like, default: [1, 2, ..., n]
4692 The positions of the boxes. The ticks and limits
4693 are automatically set to match the positions.
4694
4695 widths : float or array-like, default: None
4696 The widths of the boxes. The default is
4697 ``clip(0.15*(distance between extreme positions), 0.15, 0.5)``.
4698
4699 capwidths : float or array-like, default: None

Callers 4

boxplotMethod · 0.95
test_bxpMethod · 0.80
_bxp_test_helperFunction · 0.80
bxp.pyFile · 0.80

Calls 10

convert_unitsMethod · 0.80
get_major_locatorMethod · 0.80
get_major_formatterMethod · 0.80
do_plotFunction · 0.50
clipMethod · 0.45
getMethod · 0.45
set_labelMethod · 0.45
set_major_locatorMethod · 0.45
set_major_formatterMethod · 0.45

Tested by 2

test_bxpMethod · 0.64
_bxp_test_helperFunction · 0.64