-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Fix linewidths and colors for scatter() with unfilled markers #17543
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2bad893
to
f5c6e4a
Compare
QuLogic
approved these changes
Jun 3, 2020
A rebase will fix Travis. |
efiring
requested changes
Jun 3, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good apart from a possible inconsistency between the new behavior and the docstring.
Previously, markers with fillstyle='none' still were drawn with a facecolor.
f5c6e4a
to
d86cc2b
Compare
efiring
approved these changes
Jun 4, 2020
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Jul 7, 2020
Even though we are going to ignore it, set the facecolors to the user specified color and edgecolor to 'face' to maintain back-compatibility. We now warn if the user passes in an edgecolor that we ignore. closes matplotlib#17849 partially reverts matplotlib#17543 / d86cc2b
4 tasks
2 tasks
This was referenced Jul 25, 2020
Closed
This was referenced Aug 14, 2020
2 tasks
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Nov 11, 2020
Even though we are going to ignore it, set the facecolors to the user specified color and edgecolor to 'face' to maintain back-compatibility. We now warn if the user passes in an edgecolor that we ignore. closes matplotlib#17849 partially reverts matplotlib#17543 / d86cc2b
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Nov 24, 2020
This is brittle, but matches the behavior in Line2D. MarkerStyle objects have two coupled, but not fully redundant methods for determining if the maker is filled: the `is_filled` and `get_fillstyle` methods. If `ms.get_fillstyle() == 'none'` then `ms.is_filled() is False`, however the converse is not True. In particular the markers that can not be filled (because the Paths they are made out of can not be closed) have `ms.get_fillstyle() == 'full'` and `ms.is_filled() is False`. In Line2D we filter on the value of `get_fillstyle` not on `is_filled` so do the same in `Axes.scatter`. In Line2D we do the validation at draw time (because Line2D holds onto its MarkerStyle object instead of just extracting the path). The logic for fillstyle on Markers came in via matplotlib#447/ 213459e. closes matplotlib#17849 Revises matplotlib#17543 / d86cc2b
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Nov 24, 2020
This is brittle, but matches the behavior in Line2D. MarkerStyle objects have two coupled, but not fully redundant methods for determining if the maker is filled: the `is_filled` and `get_fillstyle` methods. If `ms.get_fillstyle() == 'none'` then `ms.is_filled() is False`, however the converse is not True. In particular the markers that can not be filled (because the Paths they are made out of can not be closed) have `ms.get_fillstyle() == 'full'` and `ms.is_filled() is False`. In Line2D we filter on the value of `get_fillstyle` not on `is_filled` so do the same in `Axes.scatter`. In Line2D we do the validation at draw time (because Line2D holds onto its MarkerStyle object instead of just extracting the path). The logic for fillstyle on Markers came in via matplotlib#447/ 213459e. closes matplotlib#17849 Revises matplotlib#17543 / d86cc2b
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Jan 21, 2021
This is brittle, but matches the behavior in Line2D. MarkerStyle objects have two coupled, but not fully redundant methods for determining if the maker is filled: the `is_filled` and `get_fillstyle` methods. If `ms.get_fillstyle() == 'none'` then `ms.is_filled() is False`, however the converse is not True. In particular the markers that can not be filled (because the Paths they are made out of can not be closed) have `ms.get_fillstyle() == 'full'` and `ms.is_filled() is False`. In Line2D we filter on the value of `get_fillstyle` not on `is_filled` so do the same in `Axes.scatter`. In Line2D we do the validation at draw time (because Line2D holds onto its MarkerStyle object instead of just extracting the path). The logic for fillstyle on Markers came in via matplotlib#447/ 213459e. closes matplotlib#17849 Revises matplotlib#17543 / d86cc2b
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Jan 22, 2021
This is brittle, but matches the behavior in Line2D. MarkerStyle objects have two coupled, but not fully redundant methods for determining if the maker is filled: the `is_filled` and `get_fillstyle` methods. If `ms.get_fillstyle() == 'none'` then `ms.is_filled() is False`, however the converse is not True. In particular the markers that can not be filled (because the Paths they are made out of can not be closed) have `ms.get_fillstyle() == 'full'` and `ms.is_filled() is False`. In Line2D we filter on the value of `get_fillstyle` not on `is_filled` so do the same in `Axes.scatter`. In Line2D we do the validation at draw time (because Line2D holds onto its MarkerStyle object instead of just extracting the path). The logic for fillstyle on Markers came in via matplotlib#447/ 213459e. closes matplotlib#17849 Revises matplotlib#17543 / d86cc2b Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
tacaswell
added a commit
to tacaswell/matplotlib
that referenced
this pull request
Jan 29, 2021
This is brittle, but matches the behavior in Line2D. MarkerStyle objects have two coupled, but not fully redundant methods for determining if the maker is filled: the `is_filled` and `get_fillstyle` methods. If `ms.get_fillstyle() == 'none'` then `ms.is_filled() is False`, however the converse is not True. In particular the markers that can not be filled (because the Paths they are made out of can not be closed) have `ms.get_fillstyle() == 'full'` and `ms.is_filled() is False`. In Line2D we filter on the value of `get_fillstyle` not on `is_filled` so do the same in `Axes.scatter`. In Line2D we do the validation at draw time (because Line2D holds onto its MarkerStyle object instead of just extracting the path). The logic for fillstyle on Markers came in via matplotlib#447/ 213459e. closes matplotlib#17849 Revises matplotlib#17543 / d86cc2b Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com> Co-authored-by: Jody Klymak <jklymak@gmail.com> Co-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Summary
Fixes:
is_filled()
.scatter()
with unfilled markers now respect markers withfillstyle='none
(previously they were drawn with a facecolor (see The markers are not hollow when I use ax.scatter() and set markers.MarkerStyle()'s fillstyle to 'none'. My usage is wrong? #17527)).Closes #17527.