8000 Merge pull request #14472 from AdamG/patch-1 · matplotlib/matplotlib@cf7e1c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit cf7e1c2

Browse 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

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/axes/_axes.py

Lines 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