Skip to content

Figure.histogram: Add parameter 'out_range' to handle extreme values and deprecate parameter 'extreme' - #4882

Merged
seisman merged 4 commits into
mainfrom
histogram/extreme
Sep 15, 2026
Merged

seisman merged 4 commits into
mainfrom
histogram/extreme

Conversation

@seisman

@seisman seisman commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

This PR migrates histogram's -L option to the new alias system and add support for Pythonic arguments.

The GMT CLI syntax is -Ll|h|b (https://docs.generic-mapping-tools.org/6.7/histogram.html#l), in which l|h|b are shorthands for low/high/both respectively. The table below summarize the current choices of parameter/argument names in GMT/PyGMT/GMT.jl:

Parameter Name Arguments
GMT option -L l/h/b
GMT long-option extreme or out_range low/first, high/last, both
PyGMT extreme first, last, both
GMT.jl out_range first, last, both

Personablly, I feel first/last are more readable and intuitive than low/high. So, this PR uses first/last, which is also consistent with GMT.jl.

One thing that still differs between GMT.jl and PyGMT is the parameter name. GMT.jl uses out_range, while PyGMT uses extreme. I feel out_range is more understandable. If we decide to use out_range, then we need to deprecate extreme to out_range in a few releases. Edit: I've renamed the parameter to out_range

@seisman seisman added enhancement Improving an existing feature discussions Need more discussion before taking further actions labels Sep 7, 2026
@seisman seisman added this to the 0.20.0 milestone Sep 7, 2026
@seisman seisman added needs review This PR has higher priority and needs review. and removed discussions Need more discussion before taking further actions labels Sep 14, 2026
@seisman seisman changed the title Figure.histogram: Let parameter 'extreme' support Pythonic arguments Figure.histogram: Add parameter 'out_range' to handle extreme values and deprecate parameter 'extreme' Sep 15, 2026
@seisman seisman added deprecation Deprecating a feature final review call This PR requires final review and approval from a second reviewer and removed needs review This PR has higher priority and needs review. labels Sep 15, 2026
@seisman seisman removed the final review call This PR requires final review and approval from a second reviewer label Sep 15, 2026
@seisman
seisman merged commit 672b690 into main Sep 15, 2026
25 of 27 checks passed
@seisman
seisman deleted the histogram/extreme branch September 15, 2026 09:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

deprecation Deprecating a feature enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants