healpy.projaxes.GnomonicAxes.boxplot

GnomonicAxes.boxplot(x, notch=False, sym='b+', vert=True, whis=1.5, positions=None, widths=None, patch_artist=False, bootstrap=None, usermedians=None, conf_intervals=None)

Make a box and whisker plot.

Call signature:

boxplot(x, notch=False, sym='+', vert=True, whis=1.5,
        positions=None, widths=None, patch_artist=False,
        bootstrap=None, usermedians=None, conf_intervals=None)

Make a box and whisker plot for each column of x or each vector in sequence x. The box extends from the lower to upper quartile values of the data, with a line at the median. The whiskers extend from the box to show the range of the data. Flier points are those past the end of the whiskers.

Function Arguments:

x :
Array or a sequence of vectors.
notch : [ False (default) | True ]
If False (default), produces a rectangular box plot. If True, will produce a notched box plot
sym : [ default ‘b+’ ]
The default symbol for flier points. Enter an empty string (‘’) if you don’t want to show fliers.
vert : [ False | True (default) ]
If True (default), makes the boxes vertical. If False, makes horizontal boxes.
whis : [ default 1.5 ]
Defines the length of the whiskers as a function of the inner quartile range. They extend to the most extreme data point within ( whis*(75%-25%) ) data range.
bootstrap : [ None (default) | integer ]
Specifies whether to bootstrap the confidence intervals around the median for notched boxplots. If bootstrap==None, no bootstrapping is performed, and notches are calculated using a Gaussian-based asymptotic approximation (see McGill, R., Tukey, J.W., and Larsen, W.A., 1978, and Kendall and Stuart, 1967). Otherwise, bootstrap specifies the number of times to bootstrap the median to determine it’s 95% confidence intervals. Values between 1000 and 10000 are recommended.
usermedians : [ default None ]
An array or sequence whose first dimension (or length) is compatible with x. This overrides the medians computed by matplotlib for each element of usermedians that is not None. When an element of usermedians == None, the median will be computed directly as normal.
conf_intervals : [ default None ]
Array or sequence whose first dimension (or length) is compatible with x and whose second dimension is 2. When the current element of conf_intervals is not None, the notch locations computed by matplotlib are overridden (assuming notch is True). When an element of conf_intervals is None, boxplot compute notches the method specified by the other kwargs (e.g., bootstrap).
positions : [ default 1,2,...,n ]
Sets the horizontal positions of the boxes. The ticks and limits are automatically set to match the positions.
widths : [ default 0.5 ]
Either a scalar or a vector and sets the width of each box. The default is 0.5, or 0.15*(distance between extreme positions) if that is smaller.
patch_artist : [ False (default) | True ]
If False produces boxes with the Line2D artist If True produces boxes with the Patch artist

Returns a dictionary mapping each component of the boxplot to a list of the matplotlib.lines.Line2D instances created. That dictionary has the following keys (assuming vertical boxplots):

  • boxes: the main body of the boxplot showing the quartiles and the median’s confidence intervals if enabled.
  • medians: horizonal lines at the median of each box.
  • whiskers: the vertical lines extending to the most extreme, n-outlier data points.
  • caps: the horizontal lines at the ends of the whiskers.
  • fliers: points representing data that extend beyone the whiskers (outliers).

Example: