Skip to content

Deprecate passing most Legend arguments positionally #23166

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 1 commit into from
May 31, 2022
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
5 changes: 5 additions & 0 deletions doc/api/next_api_changes/deprecations/23166-ES.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
``Legend`` constructor
~~~~~~~~~~~~~~~~~~~~~~

All arguments to `.legend.Legend` other than *parent*, *handles*, and *labels*
will become keyword-only in a future version.
1 change: 1 addition & 0 deletions lib/matplotlib/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,6 +294,7 @@ class Legend(Artist):
def __str__(self):
return "Legend"

@_api.make_keyword_only("3.6", "loc")
@_docstring.dedent_interpd
def __init__(
self, parent, handles, labels,
Expand Down