Skip to content
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

FIX: pcolor shading with nearest #1892

Merged
merged 4 commits into from
Oct 8, 2021

Conversation

greglucas
Copy link
Contributor

Fixes #1889

The first commit is the one that closes the issue.

I then decided to expand it to try and hit all of the shading cases and looked at gouraud as well. pcolor does not handle gouraud shading, so the way we handle wrapped cells doesn't work all that well. However, currently it raises an error, so we can at least fix that and give a nice warning and continue on with an attempt at plotting masked cells.

The third commit is a cleanup of some other shape mismatches in the tests.

I can break this out into separate PRs if that would be helpful, but I figured it was close enough.

With wrapped coordinates and shading=nearest/auto, we are updating
the points before passing into Matplotlib, so we also need to update
the shading keyword before passing into matplotlib.
Gouraud shading doesn't work with pcolor() calls. However, we can
at least attempt to get the shapes right so that an error isn't
raised, but rather a warning indicating what the user should do.
@QuLogic QuLogic merged commit 0baa5e0 into SciTools:master Oct 8, 2021
QuLogic added a commit to QuLogic/cartopy that referenced this pull request Oct 8, 2021
@greglucas greglucas deleted the pcolor-shading-nearest branch October 8, 2021 15:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incompatible dimensions with pcolormesh when using 'nearest' shading
2 participants