FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Fix for scatter not showing points with valid x/y but invalid color by QiCuiHub · Pull Request #10809 · matplotlib/matplotlib · GitHub

Repository navigation

Fix for scatter not showing points with valid x/y but invalid color - #10809

Closed
QiCuiHub wants to merge 3 commits into
matplotlib:masterfrom
QiCuiHub:colorfix-#4354
Closed

QiCuiHub wants to merge 3 commits into
matplotlib:masterfrom
QiCuiHub:colorfix-#4354

Conversation

Copy link
Copy Markdown

PR Summary

Fix for #4354 scatter points being ignored when they have a valid x,y but invalid color such as np.nan or np.inf

jklymak commented Mar 16, 2018

Copy link
Copy Markdown
Member

This PR seems reasonable to me. However, the masked kwarg is ambiguous, so I think some other name should be chosen. plotinvalid or showinvalid?

… updated

- Fixed ambiguous kwarg to a more appropriate, less ambiguous name -> plotinvalid

Copy link
Copy Markdown
Author

@jklymak you are right, we decided to change it to plotinvalid

efiring commented Mar 16, 2018

Copy link
Copy Markdown
Member

The goal is reasonable; I can see the argument for using the "set_bad" color for masked or otherwise invalid points.

I think the implementation will need quite a bit more thought and testing, however. As it stands, with plotinvalid=True, there is a huge change in behavior, affecting much more than the handling of colormapping: the deletion of points masked based on other variables (x, y, size, etc.) is disabled.

This is related to #10381.

… update 2

changed test_scatter_invalid_color(): where masked in ax.scatter (line 1680) => plotinvalid (line 1680)
tacaswell added this to the v3.0 milestone Mar 16, 2018
collection.set_array(np.asarray(c))

if plotinvalid is False:
collection.set_array(c)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

can you really get away w/o the np.asarray?

Otherwise this seems to preserve the old behaviour by default and adds a useful functionality.

This will need a whats-new entry...

tacaswell modified the milestones: v3.0, v3.1 Jul 7, 2018

jklymak commented Oct 6, 2018

Copy link
Copy Markdown
Member

Ping @QiCuiHub is this still something you want to go in? We should clear up any hesitation @efiring has.

jklymak commented Oct 6, 2018

Copy link
Copy Markdown
Member

Closing in lieu of #12422. Thanks for getting the ball rolling @QiCuiHub !

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants


Back | FazBrowse Home | New Git URL