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

Skip to content

Commit 1ba7bc8

Browse files
committed
Deprecate passing most Legend arguments positionally
There are so many of them, it really doesn't make sense to do positionally.
1 parent b66d00d commit 1ba7bc8

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed
Lines changed: 5 additions & 0 deletions
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 vesion.

lib/matplotlib/legend.py

Lines changed: 1 addition & 0 deletions
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)