8000 Backport PR #14472: Fix NameError in example code for setting label v… · matplotlib/matplotlib@28c419c · GitHub
[go: up one dir, main page]

Skip to content

Commit 28c419c

Browse files
jklymakMeeseeksDev[bot]
authored andcommitted
Backport PR #14472: Fix NameError in example code for setting label via method
1 parent 3c20e9e commit 28c419c

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
@@ -324,8 +324,8 @@ def legend(self, *args, **kwargs):
324324
325325
or::
326326
327-
line.set_label('Label via method')
328327
line, = ax.plot([1, 2, 3])
328+
line.set_label('Label via method')
329329
ax.legend()
330330
331331
Specific lines can be excluded from the automatic legend element

0 commit comments

Comments
 (0)
0