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, and violinplot, 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 when means is True, medians is True, or bardata is not None.

  • boxes (bool, optional) – Toggles thick boxplot-like error bars with a marker inside representing the mean or median. Default is True when means is True, medians is True, or boxdata is not None.

  • 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 and boxrange refer to multiples of the standard deviation, or percentile ranges. Default is False.

  • 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) when barstd is True, and (0,100) (i.e. the full data range) when barstd is False.

  • 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) when boxstd is True, and (25,75) (i.e. the middle 50th percentile) when boxstd is False.

  • 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 barlw is 0.7 and default boxlw is 4*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 is False. Default is True.

  • boxmarkercolor (color-spec, 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 and boxcolor.