8000 Merge pull request #4958 from jakevdp/linecollection-facecolor · matplotlib/matplotlib@6b32d22 · GitHub
[go: up one dir, main page]

Skip to content

Commit 6b32d22

Browse files
committed
Merge pull request #4958 from jakevdp/linecollection-facecolor
BUG: allow facecolors to be overridden in LineCollection
2 parents e2afafc + 3e3260d commit 6b32d22

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

lib/matplotlib/collections.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,6 +1053,7 @@ def __init__(self, segments, # Can be None.
10531053
cmap=None,
10541054
pickradius=5,
10551055
zorder=2,
1056+
facecolors='none',
10561057
**kwargs
10571058
):
10581059
"""
@@ -1106,6 +1107,11 @@ def __init__(self, segments, # Can be None.
11061107
*zorder*
11071108
The zorder of the LineCollection. Default is 2
11081109
1110+
*facecolors*
1111+
The facecolors of the LineCollection. Default is 'none'
1112+
Setting to a value other than 'none' will lead to a filled
1113+
polygon being drawn between points on each line.
1114+
11091115
The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
11101116
If the :class:`~matplotlib.cm.ScalarMappable` array
11111117
:attr:`~matplotlib.cm.ScalarMappable._A` is not None (i.e., a call to
@@ -1124,7 +1130,7 @@ def __init__(self, segments, # Can be None.
11241130
Collection.__init__(
11251131
self,
11261132
edgecolors=colors,
< 5340 /code>
1127-
facecolors='none',
1133+
facecolors=facecolors,
11281134
linewidths=linewidths,
11291135
linestyles=linestyles,
11301136
antialiaseds=antialiaseds,

0 commit comments

Comments
 (0)
0