-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
Issue when setting scatter color in separate method call #10381
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
Comments
This is because we create the initial artist and strip out any points that have attn @efiring as you have been working around this code recently. |
I think that adding the requested functionality will require writing a subclass of |
Do we actually need to filter out the nans (except for backcompatibility considerations)? Aren't the renderers supposed to be able to handle nan data to start with anyways? |
Good question; maybe they all can. If so, taking advantage of that would require some substantial changes, I think, because we support masked arrays, and use them internally. Going 100% with nans for missing values implies always using floating point, and switching from |
I think this is closed by #12422. If not, please reopen. |
For an application I am developing, I need to call
ax.scatter
then change the colors of the points after the fact. However, if the input x/y values contain NaN values, then setting the colors after the fact doesn't work properly. The following example:produces the following output:
The top right point should be all yellow. However it isn't, because in the
scatter
call, invalid values are removed, so when I try and set the colors withset_array
, the color values are offset from the x/y values. In the final case, things work since the 'bad' values are masked from neither the offsets nor the colors.Is there a way to achieve something along the lines of the middle example (setting the colors after the fact)
The text was updated successfully, but these errors were encountered: