-
-
Notifications
You must be signed in to change notification settings - Fork 609
Speed up mesh-based autoalign plotting of Maps #8161
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
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
After lots of testing, I have decided that matplotlib is making the correct decision to not allow NaN input to |
3d86203
to
1c0824a
Compare
d3c12b1
to
d9ca0ea
Compare
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.
Generally looks great. Just a small 🦬 to 🪒 as always.
For autoalign plotting of Maps (using
pcolormesh()
internally), it's nice that we can pass matplotlib the pixel->pixel transformation via thetransform
keyword, but that means that matplotlib performs the transformation with every rendering update (e.g., panning). Instead, we can refactor the approach so that the pixel->pixel transformation is performed only once, and then panning performance greatly improves.pcolormesh()
still needs time to render all the data pixels, butautoalign=True
is far less miserable now for interactive plots.As a bonus, because we compute the transformation ourselves instead of having matplotlib do it, we can now properly update the plot limits. Previously, matplotlib's automatic detection would get thrown off by any NaNs in the coordinates.