Skip to content

params.Axis: Add parameters hlabel/alt_label/alt_hlabel for more controls of axis labels#4589

Merged
seisman merged 6 commits intomainfrom
codex/axis-label-modifiers
Apr 15, 2026
Merged

params.Axis: Add parameters hlabel/alt_label/alt_hlabel for more controls of axis labels#4589
seisman merged 6 commits intomainfrom
codex/axis-label-modifiers

Conversation

@seisman
Copy link
Copy Markdown
Member

@seisman seisman commented Apr 15, 2026

Implements the +L/+s/+S modifiers for the -B option.

Address #4588

@seisman seisman changed the title Add Axis label modifiers params.Axis: Add parameters 'hlabel'/alt_label/alt_hlabel for more controls of axis labels Apr 15, 2026
@seisman seisman added the enhancement Improving an existing feature label Apr 15, 2026
@seisman seisman added this to the 0.19.0 milestone Apr 15, 2026
@seisman seisman changed the title params.Axis: Add parameters 'hlabel'/alt_label/alt_hlabel for more controls of axis labels params.Axis: Add parameters hlabel/alt_label/alt_hlabel for more controls of axis labels Apr 15, 2026
@seisman seisman marked this pull request as ready for review April 15, 2026 04:00
@seisman seisman force-pushed the codex/axis-label-modifiers branch from 6059e11 to 9207328 Compare April 15, 2026 04:00
@seisman seisman added the needs review This PR has higher priority and needs review. label Apr 15, 2026
Comment thread pygmt/params/frame.py Outdated
Comment thread pygmt/tests/test_params_frame.py Outdated
Comment thread pygmt/tests/test_params_frame.py Outdated
Comment on lines +21 to +32
assert (
str(
Axis(
annot=30,
label="LABEL",
hlabel="HLABEL",
alt_label="LABEL2",
alt_hlabel="HLABEL2",
)
)
== "a30+lLABEL+LHLABEL+sLABEL2+SHLABEL2"
)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm. Using label and hlabel (alt_label and alt_hlabel) together seems not meaningful for me.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

You're right. I've used meaningful axis settings in 0d7efc8.

seisman and others added 3 commits April 16, 2026 00:30
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
Copy link
Copy Markdown
Member

@yvonnefroehlich yvonnefroehlich left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Maybe we can use the hlabel parameter in the gallery example https://www.pygmt.org/dev/gallery/basemaps/double_y_axes.html.

@seisman seisman removed the needs review This PR has higher priority and needs review. label Apr 15, 2026
@seisman seisman merged commit 9bb4e3a into main Apr 15, 2026
18 of 22 checks passed
@seisman seisman deleted the codex/axis-label-modifiers branch April 15, 2026 22:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants