diff --git a/doc/api/next_api_changes/deprecations/23166-ES.rst b/doc/api/next_api_changes/deprecations/23166-ES.rst new file mode 100644 index 000000000000..cfc362ec306c --- /dev/null +++ b/doc/api/next_api_changes/deprecations/23166-ES.rst @@ -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. diff --git a/lib/matplotlib/legend.py b/lib/matplotlib/legend.py index 7aef9ed7e8b3..27069efaffb0 100644 --- a/lib/matplotlib/legend.py +++ b/lib/matplotlib/legend.py @@ -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,