Skip to content

Commit 9a8769f

Browse files
authored
plot/plot3d/clip: Simplify the -A syntax to -Ax|y (#8674)
1 parent 985a0c5 commit 9a8769f

File tree

19 files changed

+85
-86
lines changed

19 files changed

+85
-86
lines changed

doc/rst/source/clip.rst

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Synopsis
1414

1515
**gmt clip** [ *table* ] |-J|\ *parameters* |-C|\ [*n*]
1616
|SYN_OPT-Rz|
17-
[ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**] ]
17+
[ |-A|\ [**x**\|\ **y**] ]
1818
[ |SYN_OPT-B| ]
1919
|-J|\ **z**\|\ **Z**\ *parameters* ]
2020
[ |-N| ]
@@ -89,16 +89,20 @@ Optional Arguments
8989

9090
.. _-A:
9191

92-
**-A**\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**]
93-
By default, geographic line segments are connected as great circle arcs. To connect them as
94-
straight lines, use the |-A| flag. Alternatively, add **m** to connect
95-
the line by first following a meridian, then a parallel. Or append **p**
96-
to start following a parallel, then a meridian. (This can be practical
97-
to connect lines along parallels, for example).
98-
For Cartesian data, points are simply connected, unless you append
99-
**x** or **y** to construct stair-case paths whose first move is along
100-
*x* or *y*, respectively. For polar projection, append **r** or **t** to
101-
draw stair-case curves that whose first move is along *r* or *theta*, respectively.
92+
**-A**\ [**x**\|\ **y**]
93+
By default, geographic line segments are connected as great circle arcs by resampling
94+
coarse input data along such arcs. To disable this sampling and connect them as
95+
straight lines, use the |-A| flag. For Cartesian data, points are simply connected.
96+
To adjust these behaviors, append a directive:
97+
98+
- **x** - First follow *x*, then *y* for staircase curves.
99+
- **y** - First follow *y*, then *x* for staircase curves.
100+
101+
Here, *x* and *y* have the following meanings:
102+
103+
- For Cartesian projections, *x* and *y* are the X- and Y-axis.
104+
- For gragraphic projections, *x* and *y* are parallels and meridians.
105+
- For polar projections, *x* and *y* are theta and radius.
102106

103107
.. |Add_-B| replace:: |Add_-B_links|
104108
.. include:: explain_-B.rst_

doc/rst/source/explain_line_draw.rst_

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
**-A**\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**]
1+
**-A**\ [**x**\|\ **y**]
22
By default, geographic line segments are drawn as great circle arcs by resampling
33
coarse input data along such arcs. To disable this sampling and draw them as
44
straight lines, use the |-A| flag. For Cartesian data, points are simply connected.
55
To adjust these behaviors, append a directive:
66

7-
- **m** - Draw the line by first following a meridian, then a parallel.
8-
- **p** - Start following a parallel, then a meridian. (This can be practical
9-
to draw a line along parallels, for example).
10-
- **r** - For polar projections, draw stair-case curves whose first move is along *r*.
11-
- **t** - Same, but first move is along *theta*.
12-
- **x** - For Cartesian data, draw stair-case curves that whose first move is along *x*.
13-
- **y** - Same, but first move is along *y*.
7+
- **x** - First follow *x*, then *y* for staircase curves.
8+
- **y** - First follow *y*, then *x* for staircase curves.
9+
10+
Here, *x* and *y* have the following meanings:
11+
12+
- For Cartesian projections, *x* and *y* are the X- and Y-axis.
13+
- For gragraphic projections, *x* and *y* are parallels and meridians.
14+
- For polar projections, *x* and *y* are theta and radius.
1415

1516
**Note**: In :doc:`plot3d`, the |-A| option requires constant *z*-coordinates.

doc/rst/source/plot.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Synopsis
1414

1515
**gmt plot** [ *table* ] |-J|\ *parameters*
1616
|SYN_OPT-Rz|
17-
[ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**] ]
17+
[ |-A|\ [**x**\|\ **y**] ]
1818
[ |SYN_OPT-B| ]
1919
[ |-C|\ *cpt* ]
2020
[ |-D|\ *dx*\ [/*dy*] ]
@@ -249,13 +249,13 @@ Optional Arguments
249249
as column 2 (i.e., third) in any number of files having three columns. Each file may
250250
contain any number of segments per file.
251251
- **s** - Same but the two curves are given via separate pairs of tables [Default].
252-
252+
253253
Several modifiers are at your disposal:
254254

255255
- **+g** - We use the *fill* set via |-G| to fill the areas where :math:`y_0(x)` exceeds
256-
:math:`y_1(x)`. For the opposite case, append another *fill* here.
256+
:math:`y_1(x)`. For the opposite case, append another *fill* here.
257257
- **+l** - For the primary curve :math:`y_0(x)`, a legend label can be set via option
258-
|SYN_OPT-l|. For a secondary label use this modifier to append the label.
258+
|SYN_OPT-l|. For a secondary label use this modifier to append the label.
259259
- **+p** - Specify a separate pen for drawing curve :math:`y_1(x)` [Default is same pen
260260
as :math:`y_0(x)`]. See |-W| for specifying the pen for curve :math:`y_0(x)`.
261261
- **+r** - Specify a pen to simply draw a line instead of a filled box in the legend, but
@@ -309,7 +309,7 @@ Optional Arguments
309309
*width* = 0.25p, *color* = black, *style* = solid]. Modifiers can be used to change the
310310
appearance of the line:
311311

312-
- **+c** - Determine how the color from the cpt file lookup is applied to symbol
312+
- **+c** - Determine how the color from the cpt file lookup is applied to symbol
313313
and|or fill. Append **l** to have the color of the line to be taken from the CPT (see
314314
|-C|). If instead **f** is appended then the color from the cpt file is applied
315315
to symbol fill. If no argument is given the we use the color for both pen and fill.

doc/rst/source/plot3d.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Synopsis
1515
**gmt plot3d** [ *table* ] |-J|\ *parameters*
1616
|-Jz|\ \|\ **Z**\ *parameters*
1717
|SYN_OPT-Rz|
18-
[ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**] ]
18+
[ |-A|\ [**x**\|\ **y**] ]
1919
[ |SYN_OPT-B| ]
2020
[ |-C|\ *cpt* ]
2121
[ |-D|\ *dx*/*dy*\ [/*dz*] ]
@@ -211,7 +211,7 @@ Optional Arguments
211211
*width* = 0.25p, *color* = black, *style* = solid]. Modifiers can be used to change the
212212
appearance of the line:
213213

214-
- **+c** - Determine how the color from the cpt file lookup is applied to symbol
214+
- **+c** - Determine how the color from the cpt file lookup is applied to symbol
215215
and|or fill. Append **l** to have the color of the line to be taken from the CPT (see
216216
|-C|). If instead **f** is appended then the color from the cpt file is applied
217217
to symbol fill. If no argument is given the we use the color for both pen and fill.

doc/rst/source/psclip.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Synopsis
1414

1515
**gmt psclip** [ *table* ] |-J|\ *parameters* |-C|\ [*n*]
1616
|SYN_OPT-Rz|
17-
[ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**] ]
17+
[ |-A|\ [**x**\|\ **y**] ]
1818
[ |SYN_OPT-B| ]
1919
[ |-K| ] [ |-N| ] [ |-O| ]
2020
[ |-P| ] [ |-T| ]

doc/rst/source/psxy.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Synopsis
1414

1515
**gmt psxy** [ *table* ] |-J|\ *parameters*
1616
|SYN_OPT-Rz|
17-
[ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**] ]
17+
[ |-A|\ [**x**\|\ **y**] ]
1818
[ |SYN_OPT-B| ]
1919
[ |-C|\ *cpt* ]
2020
[ |-D|\ *dx*/*dy* ]

doc/rst/source/psxyz.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ Synopsis
1515
**gmt psxyz** [ *table* ] |-J|\ *parameters*
1616
|-J|\ **z**\|\ **Z**\ *parameters*
1717
|SYN_OPT-Rz|
18-
[ |-A|\ [**m**\|\ **p**\|\ **x**\|\ **y**\|\ **r**\|\ **t**] ]
18+
[ |-A|\ [**x**\|\ **y**] ]
1919
[ |SYN_OPT-B| ]
2020
[ |-C|\ *cpt* ]
2121
[ |-D|\ *dx*/*dy*\ [/*dz*] ]

src/longopt/psclip_inc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ static struct GMT_KEYWORD_DICTIONARY module_kw[] = {
2525
short_directives, long_directives,
2626
short_modifiers, long_modifiers,
2727
transproc_mask */
28-
{ 0, 'A', "straightlines|steps",
29-
"m,p,x,y,r,t", "meridian,parallel,x,y,r,theta",
28+
{ 0, 'A', "steps|stairs|straight_lines",
29+
"x,y", "x,y",
3030
"", "",
3131
GMT_TP_STANDARD },
3232
{ 0, 'C', "endclip", "", "", "", "", GMT_TP_STANDARD },

src/longopt/psxy_inc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ static struct GMT_KEYWORD_DICTIONARY module_kw[] = { /* Local options for this m
2525
short_directives, long_directives,
2626
short_modifiers, long_modifiers,
2727
transproc_mask */
28-
{ 0, 'A', "straightlines",
29-
"m,p,x,y,r,t", "mpfollow,pmfollow,xyalong,yxalong,rtalong,tralong",
28+
{ 0, 'A', "steps|stairs|straight_lines",
29+
"x,y", "x,y",
3030
"", "",
3131
GMT_TP_STANDARD },
3232
GMT_C_CPT_KW,

src/longopt/psxyz_inc.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ static struct GMT_KEYWORD_DICTIONARY module_kw[] = {
2525
short_directives, long_directives,
2626
short_modifiers, long_modifiers,
2727
transproc_mask */
28-
{ 0, 'A', "straightlines|straight_lines|straight_line",
29-
"m,p,x,y,r,t", "mpfollow,pmfollow,xyalong,yxalong,rtalong,tralong",
28+
{ 0, 'A', "steps|stairs|straight_lines",
29+
"x,y", "x,y",
3030
"", "",
3131
GMT_TP_STANDARD },
3232
GMT_C_CPT_KW,

0 commit comments

Comments
 (0)