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

Skip to content

Backport PR #28474 on branch v3.9.x (Fix typing and docs for containers) #28480

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions lib/matplotlib/axes/_axes.py
Original file line number Diff line number Diff line change
Expand Up @@ -3527,11 +3527,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
Loading