Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Sep 12, 2025

Some GMT modules like image/logo/legend/colorbar can add embellishments. These modules have similar syntax for placing these embellishments. For example, logo's -D option has the following syntax:

-D[g|j|J|n|x]refpoint[+hheight|+wwidth][+jjustify][+odx[/dy]]

in which [g|j|J|n|x]refpoint[+jjustify][+odx[/dy]] are common to all embellishments and determine the location of embellishments on maps.

The long option names are g|j|J|n|x for mapcoords,inside,outside,boxcoords,plotcoords, janchor for +j, and anchoroffset for +o.

This PR fixes the inconsistences in a few modules.

@joa-quim
Copy link
Member

Yes, inconsistent we have it but I prefer to have all +j justify, and +o, offset than janchor & anchoroffset (which means almost nothing to me at first read. I found also the psbasemap case that has "...,janchor,offset".
And remember that changing these aliases normally make the respective test to fail too.

@seisman
Copy link
Member Author

seisman commented Oct 15, 2025

I've renamed anchoroffset to offset, but for +j, I think anchor makes more sense than justify, since it sets the justification anchor point.

Copy link
Member

@joa-quim joa-quim left a comment

Choose a reason for hiding this comment

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

OK, I'm not fully convinced about +j (after all the synopsis syntax says +jjustify and not +janchor) but won't insist on this.

@seisman seisman merged commit 27bd597 into master Oct 16, 2025
12 of 13 checks passed
@seisman seisman deleted the gmtlogo/longopt branch October 16, 2025 02:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants