Skip to content

Commit a7a44b6

Browse files
authored
Deprecate passing most Legend arguments positionally (#23166)
There are so many of them, it really doesn't make sense to do positionally.
1 parent 86b777b commit a7a44b6

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
``Legend`` constructor
2+
~~~~~~~~~~~~~~~~~~~~~~
3+
4+
All arguments to `.legend.Legend` other than *parent*, *handles*, and *labels*
5+
will become keyword-only in a future version.

lib/matplotlib/legend.py

+1
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ class Legend(Artist):
294294
def __str__(self):
295295
return "Legend"
296296

297+
@_api.make_keyword_only("3.6", "loc")
297298
@_docstring.dedent_interpd
298299
def __init__(
299300
self, parent, handles, labels,

0 commit comments

Comments
 (0)