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 cf7e1c2

Browse filesBrowse files
authored
Merge pull request #14472 from AdamG/patch-1
Fix NameError in example code for setting label via method
2 parents 666d3d0 + ae5c8e2 commit cf7e1c2
Copy full SHA for cf7e1c2

File tree

Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+1
-1
lines changed

‎lib/matplotlib/axes/_axes.py

Copy file name to clipboardExpand all lines: lib/matplotlib/axes/_axes.py
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ def legend(self, *args, **kwargs):
321321
322322
or::
323323
324-
line.set_label('Label via method')
325324
line, = ax.plot([1, 2, 3])
325+
line.set_label('Label via method')
326326
ax.legend()
327327
328328
Specific lines can be excluded from the automatic legend element

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.