Skip to content

Conversation

@seisman
Copy link
Member

@seisman seisman commented Feb 10, 2026

This PR implements the Frame/Axis class for setting frame and axes attributes. It's a subset of PR #4016 because the -B option is complicated, and it will take a long time to finish #4016, which again will delay the paper submission.

Currently, only a small subset of the -B option is implemented in this PR, but it should already cover most use cases.

Here is a comparison table between the GMT CLI and the PyGMT versions:

GMT PyGMT
-B frame=True
-BWSEN frame=Frame("WSEN") or frame=Frame(axes="WSEN")
-BWSEN+tMY TITLE frame=Frame("WSEN", title="MY TITLE")
-Ba frame=Axis(annnot=True)
-Bafg frame=Axis(annot=True, tick=True, grid=True)
-Ba30f15g5 frame=Axis(annot=30, tick=15, grid=5)
-Ba30f15g5+lLABEL frame=Axis(annot=30, tick=15, grid=5, label="LABEL")
-BWSEN+tTITLE -Bxa30f15g5+lXlabel -Bya4f2g1+lYlabel frame=Frame("WSEN", title="TITLE", xaxis=Axis(annot=30, tick=15, grid=5, label="Ylabel"), yaxis=Axis(annot=4, tick=4, grid=1, label="Ylabel"))

This PR doens't break backward-compatibility, so frame="WSEN", frame="afg", frame="a30f15g5", frame=["WSEN+tTITLE", "xafg", "yafg"] are still supported.

@seisman seisman added enhancement Improving an existing feature feature Brand new feature and removed enhancement Improving an existing feature labels Feb 10, 2026
@seisman seisman added this to the 0.19.0 milestone Feb 10, 2026
@seisman seisman added the needs review This PR has higher priority and needs review. label Feb 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Brand new feature high-priority needs review This PR has higher priority and needs review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant