Skip to content

Fix jump detection in gmtmap_jump_x and re-enable psxy/nojump - #9276

Open
Esteban82 wants to merge 3 commits into
masterfrom
fix-nojump
Open

Esteban82 wants to merge 3 commits into
masterfrom
fix-nojump

Conversation

@Esteban82

Copy link
Copy Markdown
Member

Commit 0370cd8 (2018) made gmtmap_jump_x compare the longitude separation of two points against half the -R width instead of 180°. In regions 90-360° wide, any segment longer than half the region was treated as a map jump and drawn the other way (like in psxy/nojump, bottom panel). This restores the 180° test; 360° regions are unchanged since their threshold was already 180.

Tested with:

printf "115 -20\n115 15\n195 15\n" | gmt psxy -R110/215/-27/20 -JM6i -A -W5p -png nojump

Without this fix:
nojump

With this fix:
nojump2

Before: the 80° side is split in two pieces at the map edges. After: one straight line.

The first commit drops GMT_KNOWN_FAILURE from psxy/nojump with the 2015 baseline untouched. The line geometry now matches that baseline pixel for pixel, but the test is expected to still fail on its axis annotations (degree symbol and minus sign changed in 586758f). A follow-up will drop the annotations and regenerate the baseline.

Written with Claude Opus 5.5 (effort: default).

Esteban82 and others added 2 commits October 20, 2026 15:58
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Commit 0370cd8 (2018) compared the longitude separation of two
consecutive points against half the -R width instead of 180 degrees, so
in regions 90-360 degrees wide any segment longer than half the region
was treated as a map jump and drawn the other way (test psxy/nojump,
bottom panel). For 360-degree regions the threshold was already 180.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Esteban82 Esteban82 added the bug Something isn't working label Oct 20, 2026
@Esteban82 Esteban82 changed the title Fix nojump Fix jump detection in gmtmap_jump_x and re-enable psxy/nojump Oct 20, 2026
@Esteban82 Esteban82 added the maintenance Boring but important stuff for the core devs label Oct 20, 2026
The 2015 baseline has the old degree symbol and hyphen-minus in the axis
annotations (changed in 586758f, 2018-12-06), so it fails on every
platform even though the lines are now drawn correctly.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

Copy link
Copy Markdown
Contributor

Summary of changed images

This is an auto-generated report of images that have changed on the DVC remote

Status Path
modified test/baseline/psxy/
modified test/baseline/psxy/nojump.ps

Image diff(s)

Details

Added images

Modified images

Path Old New
test/baseline/psxy/nojump.ps

Report last updated at commit be217a2

@Esteban82

Copy link
Copy Markdown
Member Author

Baseline regenerated: the 2015 one has the old degree symbol and hyphen-minus in the axis annotations (changed in #206), so it failed on all platforms even though the lines now match. Lines are unchanged; only the annotation text differs.

@joa-quim

Copy link
Copy Markdown
Member

Honestly, I find the change dangerous. Paul has made like it was for a reason. Right, it leads to failures in some cases but what about others?

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants