Skip to content

Fix contours on global data plot#654

Merged
brian-rose merged 4 commits into
ProjectPythia:mainfrom
brian-rose:fix-mollweide
Jun 17, 2026
Merged

Fix contours on global data plot#654
brian-rose merged 4 commits into
ProjectPythia:mainfrom
brian-rose:fix-mollweide

Conversation

@brian-rose

@brian-rose brian-rose commented Jun 16, 2026

Copy link
Copy Markdown
Member

Closes #652

When creating a mesh of data on a lat-lon grid at the end of the Cartopy notebook, just avoid having data exactly at the poles to work around a Mollweide projection limitation.

Or, maybe better alternative, don't use Mollweide for this example!

@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

@github-actions

github-actions Bot commented Jun 16, 2026

Copy link
Copy Markdown
Contributor

👋 Thanks for opening this PR! The Cookbook will be automatically built with GitHub Actions. To see the status of your deployment, click below.
🔍 Git commit SHA: 29b6cf7
✅ Deployment Preview URL: https://ProjectPythia.github.io/pythia-foundations/_preview/654

@brian-rose brian-rose marked this pull request as ready for review June 16, 2026 03:48
@brian-rose brian-rose requested a review from a team as a code owner June 16, 2026 03:48
@brian-rose brian-rose requested review from jukent, ktyle and r-ford and removed request for a team June 16, 2026 03:48
@r-ford

r-ford commented Jun 16, 2026

Copy link
Copy Markdown
Member

Thanks for figuring this out @brian-rose! I feel like this has the potential to confuse someone new to Cartopy, since this is a bug for a specific projection that might get fixed one day and not a general rule about avoiding data at the poles in plots. I think the simplest fix would be to change the projection to one that works and still distorts the contours a bit.

@brian-rose

Copy link
Copy Markdown
Member Author

Thanks for figuring this out @brian-rose! I feel like this has the potential to confuse someone new to Cartopy, since this is a bug for a specific projection that might get fixed one day and not a general rule about avoiding data at the poles in plots. I think the simplest fix would be to change the projection to one that works and still distorts the contours a bit.

Fair point! I'll push an update that switches to a different projection.

@brian-rose brian-rose closed this Jun 17, 2026
@brian-rose brian-rose reopened this Jun 17, 2026
github-actions Bot pushed a commit that referenced this pull request Jun 17, 2026
@brian-rose brian-rose changed the title Fix contours on Mollweide plot Fix contours on global data plot Jun 17, 2026
@brian-rose

brian-rose commented Jun 17, 2026

Copy link
Copy Markdown
Member Author

The latest commit here switches over to the Equal Earth projection, with a scholarly reference to boot!

@kafitzgerald kafitzgerald left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks great!

@brian-rose brian-rose merged commit a343a1c into ProjectPythia:main Jun 17, 2026
5 of 6 checks passed
@brian-rose brian-rose deleted the fix-mollweide branch June 17, 2026 02:42
github-actions Bot pushed a commit that referenced this pull request Jun 17, 2026
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.

Mollweide map projection bug in Cartopy notebook

3 participants