Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c63b780

Browse filesBrowse files
committed
Fixed small doc change
2 parents 79ea23e + ada07f3 commit c63b780
Copy full SHA for c63b780

File tree

Expand file treeCollapse file tree

2 files changed

+10
-14
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+10
-14
lines changed

‎lib/matplotlib/figure.py

Copy file name to clipboardExpand all lines: lib/matplotlib/figure.py
+9-8Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/legend.py
+1-6Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.