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
TruewhenmeansisTrue,mediansisTrue, orbardatais notNone.boxes (bool, optional) – Toggles thick boxplot-like error bars with a marker inside representing the mean or median. Default is
TruewhenmeansisTrue,mediansisTrue, orboxdatais 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
barrangeandboxrangerefer 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) whenbarstdisTrue, and(0,100)(i.e. the full data range) whenbarstdisFalse.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) whenboxstdisTrue, and(25,75)(i.e. the middle 50th percentile) whenboxstdisFalse.barcolor, boxcolor (color-spec, 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
barlwis0.7and defaultboxlwis4*barlw.boxmarker (bool, optional) – Whether to draw a small marker in the middle of the box denoting the mean or median position. Ignored if
boxesisFalse. Default isTrue.boxmarkercolor (color-spec, optional) – Color for the
boxmarkermarker. 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
barcolorandboxcolor.