10000 Backport PR #27846: Make example in legend_elements doc more generali… · matplotlib/matplotlib@c52fd32 · GitHub
[go: up one dir, main page]

Skip to content

Commit c52fd32

Browse files
rcomermeeseeksmachine
authored andcommitted
Backport PR #27846: Make example in legend_elements doc more generalisable
1 parent 61cce9d commit c52fd32

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/matplotlib/collections.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,12 +1038,12 @@ def legend_elements(self, prop="colors", num="auto",
10381038
Create legend handles and labels for a PathCollection.
10391039
10401040
Each legend handle is a `.Line2D` representing the Path that was drawn,
1041-
and each label is a string what each Path represents.
1041+
and each label is a string that represents the Path.
10421042
10431043
This is useful for obtaining a legend for a `~.Axes.scatter` plot;
10441044
e.g.::
10451045
1046-
scatter = plt.scatter([1, 2, 3], [4, 5, 6], c=[7, 2, 3])
1046+
scatter = plt.scatter([1, 2, 3], [4, 5, 6], c=[7, 2, 3], num=None)
10471047
plt.legend(*scatter.legend_elements())
10481048
10491049
creates three legend elements, one for each color with the numerical

0 commit comments

Comments
 (0)
0