-
Notifications
You must be signed in to change notification settings - Fork 371
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
Pcolormesh wrapping fix #1622
Merged
Merged
Pcolormesh wrapping fix #1622
Conversation
This file contains 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
Use diagonals to calculate the size of cells rather than just the edge lengths which was done previously. This prevents big cells from spanning the entire plot. Co-authored-by: htonchia <[email protected]>
Adds a test of a cell that cross the boundary at a diagonal with the top edge on one side of the boundary and the bottom edge on the other.
greglucas
force-pushed
the
pcolormesh_wrapping
branch
from
August 7, 2020 14:57
dd3d5eb
to
24b1edc
Compare
QuLogic
approved these changes
Aug 20, 2020
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.
Seems good.
This was referenced Sep 9, 2020
sdeastham
referenced
this pull request
in sdeastham/gcgridobj
Sep 10, 2020
…crosses 180E An upcoming update to Cartopy (expected in 0.19.0) enables pcolormesh to correctly display polygons crossing the antimeridian. This removes the need for thresholding at that location, and means that ALL cubed sphere data is now shown on plots. Users can recover the old functionality by passing the argument `cs_threshold=5` when calling `plot_layer` (or the lower-level `plot_cs` function). A side effect of this fix is that a wrapped set of polgyons is sometimes generated when plotting one of the cubed-sphere faces. `plottools.set_clim` has been modified to account for this.
Just for documenting, I had the same issue today. Before plotting with Cartopy I had to convert the coordinates to a positive range, like |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This implements the diagonal test that @htonchia put in #1467 and adds them as a coauthor to that commit.
I additionally added a simple test to demonstrate that works as expected.
There was some additional things in that other PR that can still be implemented later if desired.
Rationale
Fixes several issues with identifying cells to mask and then uses pcolor to draw them properly.
Fixes #1416
Fixes #1447
Fixes #1328
Implications
Slight difference in edge length calculation determining what the maximum cell diagonal vs edge length is compared to before. That is why I set this at 2*sqrt(2) now, otherwise the Goode image will fail if it is just half the distance like previous edge distances.