Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f807e56

Browse files
committed
Improve errorbar returns doc
1 parent 1928c38 commit f807e56

File tree

2 files changed

+30
-8
lines changed

2 files changed

+30
-8
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2748,7 +2748,7 @@ def errorbar(self, x, y, yerr=None, xerr=None,
27482748
releases.
27492749
27502750
barsabove : bool, optional, default: False
2751-
if True , will plot the errorbars above the plot
2751+
If True , will plot the errorbars above the plot
27522752
symbols. Default is below.
27532753
27542754
lolims / uplims / xlolims / xuplims : bool, optional, default:None
@@ -2760,18 +2760,22 @@ def errorbar(self, x, y, yerr=None, xerr=None,
27602760
before :meth:`errorbar`.
27612761
27622762
errorevery : positive integer, optional, default:1
2763-
subsamples the errorbars. e.g., if errorevery=5, errorbars for
2763+
Subsamples the errorbars. e.g., if errorevery=5, errorbars for
27642764
every 5-th datapoint will be plotted. The data plot itself still
27652765
shows all data points.
27662766
27672767
Returns
27682768
-------
2769-
plotline : :class:`~matplotlib.lines.Line2D` instance
2770-
x, y plot markers and/or line
2771-
caplines : list of :class:`~matplotlib.lines.Line2D` instances
2772-
error bar cap
2773-
barlinecols : list of :class:`~matplotlib.collections.LineCollection`
2774-
horizontal and vertical error ranges.
2769+
:class:`~.container.ErrorbarContainer`
2770+
The container contains:
2771+
2772+
- plotline: :class:`~matplotlib.lines.Line2D` instance of
2773+
x, y plot markers and/or line.
2774+
- caplines: A tuple of :class:`~matplotlib.lines.Line2D` instances
2775+
of the error bar caps.
2776+
- barlinecols: A tuple of
2777+
:class:`~matplotlib.collections.LineCollection` with the
2778+
horizontal and vertical error ranges.
27752779
27762780
Other Parameters
27772781
----------------

lib/matplotlib/container.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,24 @@ def __init__(self, patches, errorbar=None, **kwargs):
114114

115115

116116
class ErrorbarContainer(Container):
117+
'''
118+
Container for errobars.
119+
120+
Atributes
121+
----------
122+
lines : tuple
123+
Tuple of ``(data_line, caplines, barlinecols)``.
124+
125+
- data_line : :class:`~matplotlib.lines.Line2D` instance of
126+
x, y plot markers and/or line.
127+
- caplines : tuple of :class:`~matplotlib.lines.Line2D` instances of
128+
the error bar caps.
129+
- barlinecols : list of :class:`~matplotlib.collections.LineCollection`
130+
with the horizontal and vertical error ranges.
131+
132+
has_xerr, has_yerr : bool
133+
``True`` if the errorbar has x/y errors.
134+
'''
117135

118136
def __init__(self, lines, has_xerr=False, has_yerr=False, **kwargs):
119137
self.lines = lines

0 commit comments

Comments
 (0)