Skip to content

Commit 43ae8f4

Browse files
committed
DOC: Clarify relation between artist label and legend entry
1 parent f8400db commit 43ae8f4

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

lib/matplotlib/axes/_axes.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,12 @@ def legend(self, *args, **kwargs):
247247
The elements to be added to the legend are automatically determined,
248248
when you do not pass in any extra arguments.
249249
250-
In this case, the labels are taken from the artist. You can specify
251-
them either at artist creation or by calling the
250+
In this case, the labels are taken from the artist when creating the
251+
legend. There is no permanent synchronization between the Artist's
252+
label property and the label in the legend.
253+
254+
You can specify the artist label during creation as keyword argument
255+
to the plotting function, or by calling the
252256
:meth:`~.Artist.set_label` method on the artist::
253257
254258
ax.plot([1, 2, 3], label='Inline label')

0 commit comments

Comments
 (0)