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

Skip to content

Commit ada07f3

Browse files
committed
MNT: do not special-case loc as positional arg
1 parent 6516c1c commit ada07f3

File tree

1 file changed

+9
-8
lines changed

1 file changed

+9
-8
lines changed

lib/matplotlib/figure.py

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1524,14 +1524,15 @@ def legend(self, *args, **kwargs):
15241524
**kwargs)
15251525
# check for third arg
15261526
if len(extra_args):
1527-
#cbook.warn_deprecated(
1528-
# "2.1",
1529-
# "Figure.legend will accept no more than two "
1530-
# "positional arguments in the future. Use "
1531-
# "'fig.legend(handles, labels, loc=location)' "
1532-
# "instead.")
1533-
kwargs['loc'] = extra_args[0]
1534-
extra_args = extra_args[1:]
1527+
# cbook.warn_deprecated(
1528+
# "2.1",
1529+
# "Figure.legend will accept no more than two "
1530+
# "positional arguments in the future. Use "
1531+
# "'fig.legend(handles, labels, loc=location)' "
1532+
# "instead.")
1533+
# kwargs['loc'] = extra_args[0]
1534+
# extra_args = extra_args[1:]
1535+
pass
15351536
l = mlegend.Legend(self, handles, labels, *extra_args, **kwargs)
15361537
self.legends.append(l)
15371538
l._remove_method = lambda h: self.legends.remove(h)

0 commit comments

Comments
 (0)