Skip to content

Fix choropleth horizontal line artifacts on projected maps#668

Merged
cvanelteren merged 2 commits intomainfrom
fix/choropleth-projection-artifacts
Mar 30, 2026
Merged

Fix choropleth horizontal line artifacts on projected maps#668
cvanelteren merged 2 commits intomainfrom
fix/choropleth-projection-artifacts

Conversation

@cvanelteren
Copy link
Copy Markdown
Collaborator

@cvanelteren cvanelteren commented Mar 30, 2026

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
Copy link
Copy Markdown

codecov bot commented Mar 30, 2026

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
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