Skip to content

Keep the -p pivot in place when +w is given without +v - #9312

Merged
Esteban82 merged 1 commit into
masterfrom
fix-poption-center
Nov 22, 2026
Merged

Esteban82 merged 1 commit into
masterfrom
fix-poption-center

Conversation

@Esteban82

Copy link
Copy Markdown
Member

Claude's Analysis:

With -p<az>/<elev>+w<lon>/<lat> and no +v, the default page position of the pivot was the page center, added on top of the current origin, so the rotated layer jumped away from its unrotated place and did not match -p180/90 or the azimuth-only -p<az>+w path.
Now the pivot stays where the unrotated plot puts it (+v still sets its page position), and test/psbasemap/poption.sh loses its known-failure flag. Scripts that use +w without +v will see the rotated layer move.

Tested with:
The black layer is rotated 45° about the South Pole (+w0/-90); the blue one is the same map unrotated. Since the pivot is the map center, both circles should coincide.

gmt psbasemap -R0/360/-90/0 -JA0/-90/4c -Bg360a360f360 -Xc -Yc -P -K -p45/90+w0/-90 > t.ps
gmt psbasemap -R -J -O -Bg360a360f360 -p180/90+w0/-90 --MAP_FRAME_PEN=thin,blue >> t.ps
gmt psconvert $ps -Tg -Z -A
master this PR
poption_1 poption_2

This fixes the known-failure test test/psbasemap/poption.sh: its flag is removed and its baseline added.

🤖 Generated with Claude Code (Claude Opus 5.5).

With -p<az>/<elev>+w<lon>/<lat> and no +v, gmtmap_init_three_D used the
page center as the default page position of the +w pivot. That offset is
applied on top of the current origin, so the rotated layer jumped away from
its unrotated place, and it disagreed with -p180/90 (handled as 2-D) and
with the azimuth-only -p<az>+w path, which both keep the pivot where it is
(test/psbasemap/poption.sh).

Without +v, keep the pivot at its unrotated 2-D map position; +v still sets
its page position, so that case is unchanged. Remove the known-failure flag
from poption.sh.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Esteban82 Esteban82 added bug Something isn't working maintenance Boring but important stuff for the core devs labels Nov 22, 2026
@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
added test/baseline/psbasemap/poption.ps
modified test/baseline/psbasemap/

Image diff(s)

Details

Added images

  • test/baseline/psbasemap/poption.png

Modified images

Path Old New

Report last updated at commit 3b40447

@Esteban82
Esteban82 requested review from a team, joa-quim and seisman November 22, 2026 14:47
@Esteban82
Esteban82 merged commit a5eafdf into master Nov 22, 2026
20 of 21 checks passed
@Esteban82
Esteban82 deleted the fix-poption-center branch November 22, 2026 19:48
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