Fix for scatter not showing points with valid x/y but invalid color#10809
Fix for scatter not showing points with valid x/y but invalid color#10809QiCuiHub wants to merge 3 commits intomatplotlib:masterfrom
Conversation
|
This PR seems reasonable to me. However, the |
… updated - Fixed ambiguous kwarg to a more appropriate, less ambiguous name -> plotinvalid
|
@jklymak you are right, we decided to change it to plotinvalid |
|
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)
| collection.set_array(np.asarray(c)) | ||
|
|
||
| if plotinvalid is False: | ||
| collection.set_array(c) |
There was a problem hiding this comment.
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...
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