add_errorbars¶

add_errorbars
(self, func, *args, medians=False, means=False, boxes=None, bars=None, boxdata=None, bardata=None, boxstd=False, barstd=False, boxmarker=True, boxmarkercolor='white', boxrange=(25, 75), barrange=(5, 95), boxcolor=None, barcolor=None, boxlw=None, barlw=None, capsize=None, boxzorder=3, barzorder=3, **kwargs)[source]¶ Wraps
plot
,scatter
,bar
, andviolinplot
, adds support for drawing error bars. Includes options for interpreting columns of data as ranges, representing the mean or median of each column with lines, points, or bars, and drawing error bars representing percentile ranges or standard deviation multiples for the data in each column. Parameters
*args – The input data.
bars (bool, optional) – Toggles thin error bars with optional “whiskers” (i.e. caps). Default is
True
whenmeans
isTrue
,medians
isTrue
, orbardata
is notNone
.boxes (bool, optional) – Toggles thick boxplotlike error bars with a marker inside representing the mean or median. Default is
True
whenmeans
isTrue
,medians
isTrue
, orboxdata
is notNone
.means (bool, optional) – Whether to plot the means of each column in the input data.
medians (bool, optional) – Whether to plot the medians of each column in the input data.
bardata, boxdata (2xN ndarray, optional) – Arrays that manually specify the thin and thick error bar coordinates. The first row contains lower bounds, and the second row contains upper bounds. Columns correspond to points in the dataset.
barstd, boxstd (bool, optional) – Whether
barrange
andboxrange
refer to multiples of the standard deviation, or percentile ranges. Default isFalse
.barrange ((float, float), optional) – Percentile ranges or standard deviation multiples for drawing thin error bars. The defaults are
(3,3)
(i.e. +/3 standard deviations) whenbarstd
isTrue
, and(0,100)
(i.e. the full data range) whenbarstd
isFalse
.boxrange ((float, float), optional) – Percentile ranges or standard deviation multiples for drawing thick error bars. The defaults are
(1,1)
(i.e. +/1 standard deviation) whenboxstd
isTrue
, and(25,75)
(i.e. the middle 50th percentile) whenboxstd
isFalse
.barcolor, boxcolor (colorspec, optional) – Colors for the thick and thin error bars. Default is
'k'
.barlw, boxlw (float, optional) – Line widths for the thin and thick error bars, in points. Default
barlw
is0.7
and defaultboxlw
is4*barlw
.boxmarker (bool, optional) – Whether to draw a small marker in the middle of the box denoting the mean or median position. Ignored if
boxes
isFalse
. Default isTrue
.boxmarkercolor (colorspec, optional) – Color for the
boxmarker
marker. Default is'w'
.capsize (float, optional) – The cap size for thin error bars, in points.
barzorder, boxzorder (float, optional) – The “zorder” for the thin and thick error bars.
lw, linewidth (float, optional) – If passed, this is used for the default
barlw
.edgecolor (float, optional) – If passed, this is used for the default
barcolor
andboxcolor
.