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

Method errorbar

lib/matplotlib/axes/_axes.py:3914–4301  ·  view source on GitHub ↗

Plot y versus x as lines and/or markers with attached errorbars. *x*, *y* define the data locations, *xerr*, *yerr* define the errorbar sizes. By default, this draws the data markers/lines as well as the errorbars. Use fmt='none' to draw errorbars without any data m

(self, x, y, yerr=None, xerr=None,
                 fmt='', ecolor=None, elinewidth=None, capsize=None,
                 barsabove=False, lolims=False, uplims=False,
                 xlolims=False, xuplims=False, errorevery=1,
                 capthick=None, elinestyle=None,
                 **kwargs)

Source from the content-addressed store, hash-verified

3912 label_namer="y")
3913 @_docstring.interpd
3914 def errorbar(self, x, y, yerr=None, xerr=None,
3915 fmt='', ecolor=None, elinewidth=None, capsize=None,
3916 barsabove=False, lolims=False, uplims=False,
3917 xlolims=False, xuplims=False, errorevery=1,
3918 capthick=None, elinestyle=None,
3919 **kwargs):
3920 """
3921 Plot y versus x as lines and/or markers with attached errorbars.
3922
3923 *x*, *y* define the data locations, *xerr*, *yerr* define the errorbar
3924 sizes. By default, this draws the data markers/lines as well as the
3925 errorbars. Use fmt='none' to draw errorbars without any data markers.
3926
3927 .. versionadded:: 3.7
3928 Caps and error lines are drawn in polar coordinates on polar plots.
3929
3930
3931 Parameters
3932 ----------
3933 x, y : float or array-like
3934 The data positions.
3935
3936 xerr, yerr : float or array-like, shape(N,) or shape(2, N), optional
3937 The errorbar sizes:
3938
3939 - scalar: Symmetric +/- values for all data points.
3940 - shape(N,): Symmetric +/-values for each data point.
3941 - shape(2, N): Separate - and + values for each bar. First row
3942 contains the lower errors, the second row contains the upper
3943 errors.
3944 - *None*: No errorbar.
3945
3946 All values must be >= 0.
3947
3948 See :doc:`/gallery/statistics/errorbar_features`
3949 for an example on the usage of ``xerr`` and ``yerr``.
3950
3951 fmt : str, default: ''
3952 The format for the data points / data lines. See `.plot` for
3953 details.
3954
3955 Use 'none' (case-insensitive) to plot errorbars without any data
3956 markers.
3957
3958 ecolor : :mpltype:`color`, default: None
3959 The color of the errorbar lines. If None, use the color of the
3960 line connecting the markers.
3961
3962 elinewidth : float, default: None
3963 The linewidth of the errorbar lines. If None, the linewidth of
3964 the current style is used.
3965
3966 elinestyle : str or tuple, default: 'solid'
3967 The linestyle of the errorbar lines.
3968 Valid values for linestyles include {'-', '--', '-.',
3969 ':', '', (offset, on-off-seq)}. See `.Line2D.set_linestyle` for a
3970 complete description.
3971

Callers 15

barMethod · 0.95
errorbarFunction · 0.45
test_visibilityFunction · 0.45
test_marker_paths_pdfFunction · 0.45
test_errorbar_removeFunction · 0.45
test_errorbarMethod · 0.45
test_fancyFunction · 0.45
test_errorbar_dashesFunction · 0.45

Calls 15

_errorevery_to_maskMethod · 0.95
_ScaledRotationClass · 0.90
ErrorbarContainerClass · 0.90
_plot_argsMethod · 0.80
add_lineMethod · 0.80
get_invertedMethod · 0.80
add_containerMethod · 0.80
popMethod · 0.45
set_zorderMethod · 0.45
shapeMethod · 0.45
get_pathsMethod · 0.45

Tested by 15

test_visibilityFunction · 0.36
test_marker_paths_pdfFunction · 0.36
test_errorbar_removeFunction · 0.36
test_errorbarMethod · 0.36
test_fancyFunction · 0.36
test_errorbar_dashesFunction · 0.36