Conversation
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
pygmt/src/grdclip.py
Outdated
| between : str or list or tuple | ||
| [*low*, *high*, *between*]. | ||
| Set all data[i] >= *low* and <= *high* to *between*. | ||
| Repeat the option for as many intervals as are needed. |
There was a problem hiding this comment.
Repeat the option for as many intervals as are needed.
It's impossible to repeat the option in Python.
There was a problem hiding this comment.
What if we could do it like frame (-B) in fig.basemap and pass in a list? Something like between=['0/2/1', '3/5/4']? Or a list of tuples like between=[(0, 2 ,1), (3, 5 ,4)] that expands to -Sb0/2/1 -Sb3/5/4 in GMT.
There was a problem hiding this comment.
between=[(0, 2 ,1), (3, 5 ,4)] makes sense to me, but it needs more coding afforts.
There was a problem hiding this comment.
There was a problem hiding this comment.
Actually I was thinking of handling this feature by changing Sb='sequence'. Perhaps implementing a sequence_tuple? But yes, this can be done in a separate enhancement PR.
There was a problem hiding this comment.
this can be done in a separate enhancement PR.
I agree.
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
weiji14
left a comment
There was a problem hiding this comment.
Good work @willschlitzer! After you merge this in (remember to tidy the commit message), please open up an issue to handle the enhancement mentioned at #1261 (comment). Thanks!
Wrap the gmt function grdclip and add tests for it. Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> Co-authored-by: Dongdong Tian <seisman.info@gmail.com> Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
Wraps the gmt function grdclip.
Fixes #
Reminders
make formatandmake checkto make sure the code follows the style guide.doc/api/index.rst.Slash Commands
You can write slash commands (
/command) in the first line of a comment to performspecific operations. Supported slash commands are:
/format: automatically format and lint the code/test-gmt-dev: run full tests on the latest GMT development version