Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clarify -T option in usage and docs #8056

Merged
merged 2 commits into from
Nov 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions doc/rst/source/supplements/seis/meca.rst
Original file line number Diff line number Diff line change
Expand Up @@ -182,14 +182,14 @@ Optional Arguments
Plots the nodal planes and outlines the bubble which is transparent.
If *nplane* is

*0*: both nodal planes are plotted;
*0*: both nodal planes are plotted [Default];

*1*: only the first nodal plane is plotted;

*2*: only the second nodal plane is plotted.

Append **/**\ *pen* to set the pen attributes for this feature.
Default pen is as set by |-W|. [Default: 0].
Default pen is as set by |-W|.

For double couple mechanisms, the |-T| option renders the beach ball transparent
by drawing only the nodal planes and the circumference.
Expand Down
8 changes: 4 additions & 4 deletions src/seis/psmeca.c
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
"-S<format>[<scale>][+a<angle>][+f<font>][+j<justify>][+l][+m][+o<dx>[/<dy>]][+s<ref>] [-A%s] [%s] "
"[-C<cpt>] [-D<depmin>/<depmax>] [-E<fill>] [-Fa[<size>[/<Psymbol>[<Tsymbol>]]]] [-Fe<fill>] [-Fg<fill>] "
"[-Fr<fill>] [-Fp[<pen>]] [-Ft[<pen>]] [-Fz[<pen>]] [-G<fill>] [-H[<scale>]] [-I[<intens>]] %s[-L<pen>] "
"[-N] %s%s[-T<nplane>[/<pen>]] [%s] [%s] [-W<pen>] [%s] [%s] %s[%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]\n",
"[-N] %s%s[-T[<nplane>[/<pen>]]] [%s] [%s] [-W<pen>] [%s] [%s] %s[%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]\n",
name, GMT_J_OPT, GMT_Rgeo_OPT, SEIS_LINE_SYNTAX, GMT_B_OPT, API->K_OPT, API->O_OPT, API->P_OPT, GMT_U_OPT, GMT_V_OPT, GMT_X_OPT,
GMT_Y_OPT, API->c_OPT, GMT_di_OPT, GMT_e_OPT, GMT_h_OPT, GMT_i_OPT, GMT_p_OPT, GMT_qi_OPT, GMT_tv_OPT, GMT_colon_OPT, GMT_PAR_OPT);

Expand Down Expand Up @@ -243,12 +243,12 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
GMT_Usage (API, -2, "Sets pen attribute for outline other than the default set by -W.");
GMT_Usage (API, 1, "\n-N Do Not skip/clip symbols that fall outside map border [Default will ignore those outside].");
GMT_Option (API, "O,P");
GMT_Usage (API, 1, "\n-T<plane>[/<pen>]");
GMT_Usage (API, 1, "\n-T[<plane>[/<pen>]]");
GMT_Usage (API, -2, "Draw specified nodal <plane>(s) and circumference only to provide a transparent beach ball "
"using the current pen (see -W; or append alternative pen):");
GMT_Usage (API, 3, "1: Only the first nodal plane is plotted.");
GMT_Usage (API, 3, "2: Only the second nodal plane is plotted.");
GMT_Usage (API, 3, "0: Both nodal planes are plotted.");
GMT_Usage (API, 3, "0: Both nodal planes are plotted [Default].");
GMT_Usage (API, -2, "Note: If moment tensor is required, nodal planes overlay moment tensor.");
GMT_Option (API, "U,V");
GMT_Usage (API, 1, "\n-W<pen>");
Expand Down Expand Up @@ -518,7 +518,7 @@ static int parse (struct GMT_CTRL *GMT, struct PSMECA_CTRL *Ctrl, struct GMT_OPT
break;
case 'T':
n_errors += gmt_M_repeated_module_option (API, Ctrl->T.active);
sscanf (opt->arg, "%d", &Ctrl->T.n_plane);
if (opt->arg[0]) sscanf (opt->arg, "%d", &Ctrl->T.n_plane);
if (strlen (opt->arg) > 2 && gmt_getpen (GMT, &opt->arg[2], &Ctrl->T.pen)) { /* Set transparent attributes */
gmt_pen_syntax (GMT, 'T', NULL, " ", NULL, 0);
n_errors++;
Expand Down