Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix choropleth horizontal line artifacts on projected maps#668

Merged
cvanelteren merged 2 commits into
mainUltraplot/UltraPlot:mainfrom
fix/choropleth-projection-artifactsUltraplot/UltraPlot:fix/choropleth-projection-artifactsCopy head branch name to clipboard
Mar 30, 2026
Merged

Fix choropleth horizontal line artifacts on projected maps#668
cvanelteren merged 2 commits into
mainUltraplot/UltraPlot:mainfrom
fix/choropleth-projection-artifactsUltraplot/UltraPlot:fix/choropleth-projection-artifactsCopy head branch name to clipboard

Conversation

@cvanelteren

@cvanelteren cvanelteren commented Mar 30, 2026

Copy link
Copy Markdown
Collaborator

Fix an issue where choropleths were not rendering properly for anti-meridian plots.

Use Cartopy's project_geometry() instead of transform_points() for
choropleth polygon projection. transform_points() projects vertices
independently without geometric awareness, so polygons crossing the
antimeridian (e.g. Russia) produce path segments that jump across the
entire map, rendering as visible horizontal lines.

project_geometry() properly splits and clips polygons at projection
boundaries before converting to matplotlib paths, eliminating the
artifacts on all projections (Robinson, Mercator, Mollweide, etc.).
@cvanelteren cvanelteren enabled auto-merge (squash) March 30, 2026 23:28
@codecov

codecov Bot commented Mar 30, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.67925% with 6 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
ultraplot/axes/geo.py 60.00% 2 Missing and 4 partials ⚠️

📢 Thoughts on this report? Let us know!

@cvanelteren cvanelteren merged commit 5094004 into main Mar 30, 2026
19 checks passed
@cvanelteren cvanelteren deleted the fix/choropleth-projection-artifacts branch March 30, 2026 23:42
cvanelteren added a commit that referenced this pull request Mar 31, 2026
* Fix choropleth horizontal line artifacts on projected maps

Use Cartopy's project_geometry() instead of transform_points() for
choropleth polygon projection. transform_points() projects vertices
independently without geometric awareness, so polygons crossing the
antimeridian (e.g. Russia) produce path segments that jump across the
entire map, rendering as visible horizontal lines.

project_geometry() properly splits and clips polygons at projection
boundaries before converting to matplotlib paths, eliminating the
artifacts on all projections (Robinson, Mercator, Mollweide, etc.).

* Black
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.

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.