Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Doc] Clarify edgecolors default for Collection #29252

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
Loading
from
Open
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
6 changes: 4 additions & 2 deletions 6 lib/matplotlib/collections.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,10 +98,12 @@ def __init__(self, *,
"""
Parameters
----------
edgecolors : :mpltype:`color` or list of colors, default: :rc:`patch.edgecolor`
edgecolors : :mpltype:`color` or list of colors, optional
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
edgecolors : :mpltype:`color` or list of colors, optional
edgecolors : :mpltype:`color` or list of colors or "face", optional

As also written here https://matplotlib.org/stable/api/collections_api.html#matplotlib.collections.Collection.set_edgecolor

Edge color for each patch making up the collection. The special
value 'face' can be passed to make the edgecolor match the
facecolor.
facecolor. If not provided, the value is :rc:`patch.edgecolor` if
:rc:`patch.force_edgecolor` is True or *facecolors* is 'none',
otherwise 'none'.
Comment on lines +104 to +106
Copy link
Member

Choose a reason for hiding this comment

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

Is the following more understandable? While your description is technically correct, it's hard to understand why these special rule exists. I've

  • moved the common/default first 'none' to the beginning
  • stated the exception of the default
  • without spending extra words hopefully allude to 'none' being not a good value if facecolors is also 'none' because both would be invisible
Suggested change
facecolor. If not provided, the value is :rc:`patch.edgecolor` if
:rc:`patch.force_edgecolor` is True or *facecolors* is 'none',
otherwise 'none'.
facecolor.
If not provided, the value is 'none', i.e. the edge is invisible, unless
*facecolors* is 'none' or :rc:`patch.force_edgecolor` is True, which both
result in a fallback to rc:`patch.edgecolor`.

facecolors : :mpltype:`color` or list of colors, default: :rc:`patch.facecolor`
Face color for each patch making up the collection.
linewidths : float or list of floats, default: :rc:`patch.linewidth`
Expand Down
Loading
Morty Proxy This is a proxified and sanitized view of the page, visit original site.