Thanks to visit codestin.com
Credit goes to github.com

Skip to content

BUG: allow facecolors to be overridden in LineCollection #4958

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Aug 19, 2015
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion lib/matplotlib/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -1053,6 +1053,7 @@ def __init__(self, segments, # Can be None.
cmap=None,
pickradius=5,
zorder=2,
facecolors='none',
**kwargs
):
"""
Expand Down Expand Up @@ -1106,6 +1107,11 @@ def __init__(self, segments, # Can be None.
*zorder*
The zorder of the LineCollection. Default is 2

*facecolors*
The facecolors of the LineCollection. Default is 'none'
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a quick little explanation of what it means for a line collection to have a facecolor?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

Setting to a value other than 'none' will lead to a filled
polygon being drawn between points on each line.

The use of :class:`~matplotlib.cm.ScalarMappable` is optional.
If the :class:`~matplotlib.cm.ScalarMappable` array
:attr:`~matplotlib.cm.ScalarMappable._A` is not None (i.e., a call to
Expand All @@ -1124,7 +1130,7 @@ def __init__(self, segments, # Can be None.
Collection.__init__(
self,
edgecolors=colors,
facecolors='none',
facecolors=facecolors,
linewidths=linewidths,
linestyles=linestyles,
antialiaseds=antialiaseds,
Expand Down