Skip to content

Commit

Permalink
Fix typing and docs for containers
Browse files Browse the repository at this point in the history
  • Loading branch information
QuLogic committed Jun 26, 2024
1 parent d347c32 commit bb20e8e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 15 deletions.
6 changes: 3 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3533,11 +3533,11 @@ def errorbar(self, x, y, yerr=None, xerr=None,
`.ErrorbarContainer`
The container contains:
- plotline: `~matplotlib.lines.Line2D` instance of x, y plot markers
- data_line : A `~matplotlib.lines.Line2D` instance of x, y plot markers
and/or line.
- caplines: A tuple of `~matplotlib.lines.Line2D` instances of the error
- caplines : A tuple of `~matplotlib.lines.Line2D` instances of the error
bar caps.
- barlinecols: A tuple of `.LineCollection` with the horizontal and
- barlinecols : A tuple of `.LineCollection` with the horizontal and
vertical error ranges.
Other Parameters
Expand Down
20 changes: 10 additions & 10 deletions lib/matplotlib/container.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ class ErrorbarContainer(Container):
lines : tuple
Tuple of ``(data_line, caplines, barlinecols)``.
- data_line : :class:`~matplotlib.lines.Line2D` instance of
x, y plot markers and/or line.
- caplines : tuple of :class:`~matplotlib.lines.Line2D` instances of
the error bar caps.
- barlinecols : list of :class:`~matplotlib.collections.LineCollection`
with the horizontal and vertical error ranges.
- data_line : A `~matplotlib.lines.Line2D` instance of x, y plot markers
and/or line.
- caplines : A tuple of `~matplotlib.lines.Line2D` instances of the error
bar caps.
- barlinecols : A tuple of `~matplotlib.collections.LineCollection` with the
horizontal and vertical error ranges.
has_xerr, has_yerr : bool
``True`` if the errorbar has x/y errors.
Expand All @@ -115,13 +115,13 @@ class StemContainer(Container):
Attributes
----------
markerline : :class:`~matplotlib.lines.Line2D`
markerline : `~matplotlib.lines.Line2D`
The artist of the markers at the stem heads.
stemlines : list of :class:`~matplotlib.lines.Line2D`
stemlines : `~matplotlib.collections.LineCollection`
The artists of the vertical lines for all stems.
baseline : :class:`~matplotlib.lines.Line2D`
baseline : `~matplotlib.lines.Line2D`
The artist of the horizontal baseline.
"""
def __init__(self, markerline_stemlines_baseline, **kwargs):
Expand All @@ -130,7 +130,7 @@ def __init__(self, markerline_stemlines_baseline, **kwargs):
----------
markerline_stemlines_baseline : tuple
Tuple of ``(markerline, stemlines, baseline)``.
``markerline`` contains the `.LineCollection` of the markers,
``markerline`` contains the `.Line2D` of the markers,
``stemlines`` is a `.LineCollection` of the main lines,
``baseline`` is the `.Line2D` of the baseline.
"""
Expand Down
4 changes: 2 additions & 2 deletions lib/matplotlib/container.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@ class BarContainer(Container):
) -> None: ...

class ErrorbarContainer(Container):
lines: tuple[Line2D, Line2D, LineCollection]
lines: tuple[Line2D, tuple[Line2D, ...], tuple[LineCollection, ...]]
has_xerr: bool
has_yerr: bool
def __init__(
self,
lines: tuple[Line2D, Line2D, LineCollection],
lines: tuple[Line2D, tuple[Line2D, ...], tuple[LineCollection, ...]],
has_xerr: bool = ...,
has_yerr: bool = ...,
**kwargs
Expand Down

0 comments on commit bb20e8e

Please sign in to comment.