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

Skip to content

Commit c63b780

Browse files
committed
Fixed small doc change
2 parents 79ea23e + ada07f3 commit c63b780

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
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)

lib/matplotlib/legend.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1318,12 +1318,7 @@ def _get_legend_handles(axs, legend_handler_map=None):
13181318

13191319
def _get_legend_handles_labels(axs, legend_handler_map=None):
13201320
"""
1321-
Return handles and labels for legend
1322-
1323-
``ax.legend()`` is equivalent to ::
1324-
1325-
h, l = ax.get_legend_handles_labels()
1326-
ax.legend(h, l)
1321+
Return handles and labels for legend, internal method.
13271322
13281323
"""
13291324
handles = []

0 commit comments

Comments
 (0)