8000 Merge pull request #27847 from meeseeksmachine/auto-backport-of-pr-27… · matplotlib/matplotlib@e8d9bbd · GitHub
[go: up one dir, main page]

Skip to content 8000

Commit e8d9bbd

Browse files
authored
Merge pull request #27847 from meeseeksmachine/auto-backport-of-pr-27846-on-v3.8.x
Backport PR #27846 on branch v3.8.x (Make example in legend_elements doc more generalisable)
2 parents 61cce9d + c52fd32 commit e8d9bbd

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