Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork8.1k
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Merged
Uh oh!
There was an error while loading.Please reload this page.
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
QuLogic approved these changesJun 3, 2020
Member
QuLogic commentedJun 3, 2020
A rebase will fix Travis. |
efiring requested changesJun 3, 2020
Member
efiring left a comment
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.
Uh oh!
There was an error while loading.Please reload this page.
Previously, markers with fillstyle='none' still were drawn with a facecolor.
efiring approved these changesJun 4, 2020
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJul 7, 2020
Even though we are going to ignore it, set the facecolors to the userspecified color and edgecolor to 'face' to maintainback-compatibility.We now warn if the user passes in an edgecolor that we ignore.closesmatplotlib#17849partially revertsmatplotlib#17543 /d86cc2b
4 tasks
2 tasks
This was referencedJul 25, 2020
Closed
This was referencedAug 14, 2020
2 tasks
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestNov 11, 2020
Even though we are going to ignore it, set the facecolors to the userspecified color and edgecolor to 'face' to maintainback-compatibility.We now warn if the user passes in an edgecolor that we ignore.closesmatplotlib#17849partially revertsmatplotlib#17543 /d86cc2b
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestNov 24, 2020
This is brittle, but matches the behavior in Line2D.MarkerStyle objects have two coupled, but not fully redundant methodsfor 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. Inparticular the markers that can not be filled (because the Paths theyare 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 ontoits MarkerStyle object instead of just extracting the path).The logic for fillstyle on Markers came in viamatplotlib#447/213459e.closesmatplotlib#17849Revisesmatplotlib#17543 /d86cc2b
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestNov 24, 2020
This is brittle, but matches the behavior in Line2D.MarkerStyle objects have two coupled, but not fully redundant methodsfor 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. Inparticular the markers that can not be filled (because the Paths theyare 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 ontoits MarkerStyle object instead of just extracting the path).The logic for fillstyle on Markers came in viamatplotlib#447/213459e.closesmatplotlib#17849Revisesmatplotlib#17543 /d86cc2b
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 21, 2021
This is brittle, but matches the behavior in Line2D.MarkerStyle objects have two coupled, but not fully redundant methodsfor 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. Inparticular the markers that can not be filled (because the Paths theyare 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 ontoits MarkerStyle object instead of just extracting the path).The logic for fillstyle on Markers came in viamatplotlib#447/213459e.closesmatplotlib#17849Revisesmatplotlib#17543 /d86cc2b
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 22, 2021
This is brittle, but matches the behavior in Line2D.MarkerStyle objects have two coupled, but not fully redundant methodsfor 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. Inparticular the markers that can not be filled (because the Paths theyare 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 ontoits MarkerStyle object instead of just extracting the path).The logic for fillstyle on Markers came in viamatplotlib#447/213459e.closesmatplotlib#17849Revisesmatplotlib#17543 /d86cc2bCo-authored-by: Tim Hoffmann <2836374+timhoffm@users.noreply.github.com>
tacaswell added a commit to tacaswell/matplotlib that referenced this pull requestJan 29, 2021
This is brittle, but matches the behavior in Line2D.MarkerStyle objects have two coupled, but not fully redundant methodsfor 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. Inparticular the markers that can not be filled (because the Paths theyare 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 ontoits MarkerStyle object instead of just extracting the path).The logic for fillstyle on Markers came in viamatplotlib#447/213459e.closesmatplotlib#17849Revisesmatplotlib#17543 /d86cc2bCo-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 freeto 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.
Uh oh!
There was an error while loading.Please reload this page.
PR Summary
Fixes:
is_filled().scatter()with unfilled markers now respect markers withfillstyle='none(previously they were drawn with a facecolor (seeThe markers are not hollow when I use ax.scatter() and set markers.MarkerStyle()'s fillstyle to 'none'. My usage is wrong? #17527)).Closes#17527.