Skip to content

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
merged 2 commits into from
Jun 4, 2020

Conversation

timhoffm
Copy link
Member

@timhoffm timhoffm commented May 31, 2020

PR Summary

Fixes:

Closes #17527.

@timhoffm timhoffm force-pushed the unfilled-markers branch from 2bad893 to f5c6e4a Compare June 1, 2020 01:12
@QuLogic
Copy link
Member

QuLogic commented Jun 3, 2020

A rebase will fix Travis.

Copy link
Member

@efiring efiring left a 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.

timhoffm added 2 commits June 4, 2020 21:55
@timhoffm timhoffm force-pushed the unfilled-markers branch from f5c6e4a to d86cc2b Compare June 4, 2020 20:07
@efiring efiring merged commit 16ae71f into matplotlib:master Jun 4, 2020
@QuLogic QuLogic added this to the v3.3.0 milestone Jun 4, 2020
@timhoffm timhoffm deleted the unfilled-markers branch June 5, 2020 08:43
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
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Jul 8, 2020
…rkers"

This reverts commit 16ae71f, reversing
changes made to 7a6c5d3.
QuLogic added a commit to QuLogic/matplotlib that referenced this pull request Jul 9, 2020
…rkers"

This reverts commit 16ae71f, reversing
changes made to 7a6c5d3.
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
Projects
None yet
4 participants