8000 Replaced list with tuple in pyplot for axes by EngineerKhan · Pull Request #26521 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content

Replaced list with tuple in pyplot for axes #26521

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 2 commits into from
Aug 30, 2023
Merged
Changes from 1 commit
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
4 changes: 2 additions & 2 deletions lib/matplotlib/pyplot.py
Original file line number Diff line number Diff line change
Expand Up @@ -1134,7 +1134,7 @@ def figlegend(*args, **kwargs) -> Legend:

@_docstring.dedent_interpd
def axes(
arg: None | tuple[float, float, float, float] = None,
arg: None | tuple(float, float, float, float) = None,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These need to be square brackets, that is type hinting syntax, which does not change because it's a tuple

Copy link
Member
@timhoffm timhoffm Aug 30, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took the liberty of reverting this via an additional commit in the GitHub UI. @devs Please squash-merge.

**kwargs
) -> matplotlib.axes.Axes:
"""
Expand All @@ -1153,7 +1153,7 @@ def axes(

- *None*: A new full window Axes is added using
``subplot(**kwargs)``.
- 4-tuple of floats *rect* = ``[left, bottom, width, height]``.
- 4-tuple of floats *rect* = ``(left, bottom, width, height)``.
A new Axes is added with dimensions *rect* in normalized
(0, 1) units using `~.Figure.add_axes` on the current figure.

Expand Down
0