MCPcopy Create free account
hub / github.com/GenericMappingTools/gmt / usage

Function usage

src/pswiggle.c:218–270  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

216}
217
218static int usage (struct GMTAPI_CTRL *API, int level) {
219
220 /* This displays the pswiggle synopsis and optionally full usage information */
221
222 const char *name = gmt_show_name_and_purpose (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_PURPOSE);
223 if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR);
224 GMT_Usage (API, 0, "usage: %s [<table>] %s %s -Z<scale>[<unit>] [-A[<azimuth>]] [%s] [-C<center>] [-D%s+w<length>[+a]%s%s[+l<label>]] "
225 "[-F%s] [-G<fill>[+n][+p]] [-I<az>] [%s] %s%s%s[-T<pen>] [%s] [%s] [-W<pen>] [%s] [%s] [%s] %s[%s] [%s] [%s] "
226 "[%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s] [%s]\n",
227 name, GMT_J_OPT, GMT_Rgeoz_OPT, GMT_B_OPT, GMT_XYANCHOR, GMT_JUSTIFY, GMT_OFFSET, GMT_PANEL, GMT_Jz_OPT,
228 API->K_OPT, API->O_OPT, API->P_OPT, GMT_U_OPT, GMT_V_OPT, GMT_X_OPT, GMT_Y_OPT, GMT_bi_OPT, API->c_OPT, GMT_di_OPT,
229 GMT_e_OPT, GMT_f_OPT, GMT_g_OPT, GMT_h_OPT, GMT_i_OPT, GMT_p_OPT, GMT_qi_OPT, GMT_t_OPT, GMT_w_OPT,
230 GMT_colon_OPT, GMT_PAR_OPT);
231
232 if (level == GMT_SYNOPSIS) return (GMT_MODULE_SYNOPSIS);
233
234 GMT_Message (API, GMT_TIME_NONE, " REQUIRED ARGUMENTS:\n");
235 GMT_Option (API, "<,J-,R");
236 GMT_Usage (API, 1, "\n-Z<scale>[<unit>]");
237 GMT_Usage (API, -2, "Give the wiggle <scale> in data-units per %s. "
238 "Alternatively, append any unit from among %s [c].", API->GMT->session.unit_name[API->GMT->current.setting.proj_length_unit], GMT_DIM_UNITS_DISPLAY);
239 GMT_Message (API, GMT_TIME_NONE, "\n OPTIONAL ARGUMENTS:\n");
240 GMT_Usage (API, 1, "\n-A[<azimuth>]");
241 GMT_Usage (API, -2, "Set <azimuth> for preferred positive wiggle orientation [0.0 (north)]. "
242 "Perpendiculars to the track are mapped into a -90/+90 window centered on <azimuth>. "
243 "If no azimuth is given then we use the azimuths as they are computed.");
244 GMT_Option (API, "B-");
245 GMT_Usage (API, 1, "\n-C<center>");
246 GMT_Usage (API, -2, "Set center value to be removed from z before plotting [0].");
247 gmt_refpoint_syntax (API->GMT, "\n-D", "Specify position and dimensions of the vertical scale bar.", GMT_ANCHOR_VSCALE, 3);
248 GMT_Usage (API, 3, "+w Append <length> to set the scale length in data z-units.");
249 GMT_Usage (API, 3, "+a Move label to the opposite side of vertical scale bar.");
250 GMT_Usage (API, 3, "+l Set the unit label of the z-values for the scale bar label [no label].");
251 gmt_mappanel_syntax (API->GMT, 'F', "Specify a rectangular panel behind the vertical scale.", 4);
252 gmt_fill_syntax (API->GMT, 'G', NULL, "Specify color/pattern for positive and/or negative areas.");
253 GMT_Usage (API, -2, "You can control which areas are to be painted:");
254 GMT_Usage (API, 3, "+p Fill positive areas only (Default).");
255 GMT_Usage (API, 3, "+n Fill negative areas only.");
256 GMT_Usage (API, -2, "Append both modifiers to fill positive and negative areas.");
257 GMT_Usage (API, 1, "\n-I<az>");
258 GMT_Usage (API, -2, "Set fixed projection azimuths for wiggles. "
259 "Azimuths of the perpendiculars to the track are reset to <az>.");
260 GMT_Option (API, "Z,K");
261 GMT_Option (API, "O,P");
262 GMT_Usage (API, 1, "\n-T<pen>");
263 GMT_Usage (API, -2, "Specify track pen attributes [Default draws no track].");
264 GMT_Option (API, "U,V");
265 gmt_pen_syntax (API->GMT, 'W', NULL, "Specify outline pen attributes [Default is no outline].", NULL, 0);
266 GMT_Option (API, "X");
267 GMT_Option (API, "bi3,c,di,e,f,g,h,i,p,qi,t,w,:,.");
268
269 return (GMT_MODULE_USAGE);
270}
271
272static int parse (struct GMT_CTRL *GMT, struct PSWIGGLE_CTRL *Ctrl, struct GMT_OPTION *options) {
273 /* This parses the options provided to pswiggle and sets parameters in Ctrl.

Callers 1

GMT_pswiggleFunction · 0.70

Calls 8

GMT_UsageFunction · 0.85
GMT_MessageFunction · 0.85
GMT_OptionFunction · 0.85
gmt_refpoint_syntaxFunction · 0.85
gmt_mappanel_syntaxFunction · 0.85
gmt_fill_syntaxFunction · 0.85
gmt_pen_syntaxFunction · 0.85

Tested by

no test coverage detected