Skip to content

Keep seam faces in polygon plots#1519

Merged
erogluorhan merged 3 commits into
mainfrom
rajeeja/fix-ne30pg2-seam-plot
Jun 5, 2026
Merged

Keep seam faces in polygon plots#1519
erogluorhan merged 3 commits into
mainfrom
rajeeja/fix-ne30pg2-seam-plot

Conversation

@rajeeja
Copy link
Copy Markdown
Contributor

@rajeeja rajeeja commented May 29, 2026

Summary

  • use split seam handling by default for shaded polygon plots
  • add ne30pg2 coverage for seam-crossing faces

Closes #1518

@review-notebook-app
Copy link
Copy Markdown

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR addresses seam/antimeridian artifacts in face-centered shaded polygon plots by changing the default periodic-element handling to preserve seam-crossing faces, and adds regression coverage for the NE30PG2 SCRIP tutorial dataset.

Changes:

  • Switch UxDataArray.plot.polygons() (and thus UxDataArray.plot() for face-centered data) to default periodic_elements="split" so seam-crossing faces are not dropped.
  • Add a NE30PG2 regression test intended to ensure antimeridian faces are preserved when using split handling.
  • Update plotting documentation to reflect the new default and show explicit exclude vs split examples.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.

File Description
uxarray/plot/accessor.py Changes default polygon plotting behavior to split periodic (seam-crossing) faces and updates docstring text.
test/core/test_dataarray.py Adds a NE30PG2 regression test for split periodic handling (with a few correctness/naming adjustments needed).
docs/user-guide/plotting.ipynb Updates user-guide narrative and examples to match the new default and recommended options.
docs/user-guide/mpl.ipynb Clarifies Matplotlib to_polycollection() default periodic handling in the docs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread uxarray/plot/accessor.py Outdated
Comment thread test/core/test_dataarray.py Outdated
Comment thread test/core/test_dataarray.py Outdated
@rajeeja rajeeja requested a review from erogluorhan June 5, 2026 20:09
Copy link
Copy Markdown
Member

@erogluorhan erogluorhan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing this! It makes sense to me. For very large datasets though, this would lead to performance issues, but I think it is reasonable to expect the user to give the docs a read first to choose the performant way.

@erogluorhan erogluorhan merged commit 5625cc9 into main Jun 5, 2026
13 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Do not drop seam-crossing faces in polygon plots

3 participants