Skip to content

Figure.histogram: Let parameter 'extreme' support Pythonic arguments - #4882

Open
seisman wants to merge 2 commits into
mainfrom
histogram/extreme
Open

Figure.histogram: Let parameter 'extreme' support Pythonic arguments#4882
seisman wants to merge 2 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.

@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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

discussions Need more discussion before taking further actions enhancement Improving an existing feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant