Improve documentation for +r option in the regions tutorial #1027
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of proposed changes
The
+rincrement
option in the tutorial for ISO code may mislead some new GMT users (originally posted in #983 (comment)).+r
option in GMT DOCTake
JP
as an example:Output:
Use
[+r|R|e[incs]]
option:JP+R1
: [121.938515 146.820877 19.528774 46.523136]JP+R2
: [120.938515 147.820877 18.528774 47.523136]JP+R3
: [119.938515 148.820877 17.528774 48.523136]JP+r1
: [122. 146. 20. 46.]JP+r2
: [122. 146. 20. 46.]JP+r3
: [120. 147. 18. 48.]JP+e1
: [122. 147. 20. 46.]JP+e2
: [122. 148. 20. 48.]JP+e3
: [120. 147. 18. 48.]We can see:
+Rinc
extends the region outward by adding these increments (using+R3
,119.938515
=122.938515
-3
)+rinc
adjusts the final region boundaries to be multiples of these steps (using+r3
,120
,147
,18
,48
are multiples of 3)+einc
is similar to+rinc
(final region boundaries to be multiples of these steps), but it ensures that the bounding box extends by at least 0.25 times the increment. So,+e1
adjusts145.820877
to be147
instead of146
by+r1
since146-145.820877=0.18
<0.25*1
.+e2
adjusts145.820877
to be148
,45.523136
to be48
for the same reason.Related to #983 and #996.
Reminders
make format
andmake check
to 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