From fe5cf32041c1afe09ecaec08f157d0da3b0e8fa3 Mon Sep 17 00:00:00 2001 From: Paul Wessel Date: Tue, 28 Nov 2023 10:50:38 +0100 Subject: [PATCH] Fix incomplete -Q in docs and usage messages The -Q option can either take an integer (number of points a contour has to have to be plotted) or a minimum length in a variety of units. The code parsed that but apart from the usage message the synopsis and docs did not mention the length choice. This PR updates the synopsis and docs. --- doc/rst/source/contour.rst | 6 +++--- doc/rst/source/grdcontour.rst | 6 +++--- doc/rst/source/pscontour.rst | 2 +- src/grdcontour.c | 6 +++--- src/pscontour.c | 4 ++-- 5 files changed, 12 insertions(+), 12 deletions(-) diff --git a/doc/rst/source/contour.rst b/doc/rst/source/contour.rst index e5a00665dab..1091c7d601f 100644 --- a/doc/rst/source/contour.rst +++ b/doc/rst/source/contour.rst @@ -26,7 +26,7 @@ Synopsis [ |-J|\ **z**\|\ **Z**\ *parameters* ] [ |-L|\ *pen* ] [ |-N| ] -[ |-Q|\ [*n*][**+z**] ] +[ |-Q|\ [*n*\|\ *length*\ [*unit*]][**+z**] ] [ |-S|\ [*p*\|\ *t*] ] [ |-T|\ [**h**\|\ **l**][**+a**][**+d**\ *gap*\ [/*length*]][**+l**\ [*labels*]] ] [ |SYN_OPT-U| ] @@ -185,9 +185,9 @@ Optional Arguments .. _-Q: -**-Q**\ [*n*][**+z**] +**-Q**\ [*n*\|\ *length*\ [*unit*]][**+z**] Do not draw contours with less than *n* number of points [Draw all contours]. - Alternatively, give instead a minimum contour length in distance units + Alternatively, give instead a minimum contour *length* in distance units (see `Units`_ for available units and how distances are computed), including **c** (Cartesian distances using user coordinates) or **C** for plot length units in current plot units after projecting the coordinates. diff --git a/doc/rst/source/grdcontour.rst b/doc/rst/source/grdcontour.rst index ef9f527ba0d..b7ad517ad9f 100644 --- a/doc/rst/source/grdcontour.rst +++ b/doc/rst/source/grdcontour.rst @@ -21,7 +21,7 @@ Synopsis [ |-G|\ [**d**\|\ **f**\|\ **n**\|\ **l**\|\ **L**\|\ **x**\|\ **X**]\ *params* ] [ |-L|\ *low/high*\|\ **n**\|\ **N**\|\ **P**\|\ **p** ] [ |-N|\ [*cpt*] ] -[ |-Q|\ [*n*][**+z**] ] +[ |-Q|\ [*n*\|\ *length*\ [*unit*]][**+z**] ] [ |SYN_OPT-Rz| ] [ |-S|\ *smoothfactor* ] [ |-T|\ [**h**\|\ **l**][**+a**][**+d**\ *gap*\ [/*length*]][**+l**\ [*labels*]] ] @@ -177,9 +177,9 @@ Optional Arguments .. _-Q: -**-Q**\ [*n*][**+z**] +**-Q**\ [*n*\|\ *length*\ [*unit*]][**+z**] Do not draw contours with less than *n* number of points [Draw all contours]. - Alternatively, give instead a minimum contour length in distance units + Alternatively, give instead a minimum contour *length* in distance units (see `Units`_ for available units and how distances are computed), including **c** (Cartesian distances using user coordinates) or **C** for plot length units in current plot units after projecting the coordinates. diff --git a/doc/rst/source/pscontour.rst b/doc/rst/source/pscontour.rst index 06bf89dede5..97bda351eb3 100644 --- a/doc/rst/source/pscontour.rst +++ b/doc/rst/source/pscontour.rst @@ -29,7 +29,7 @@ Synopsis [ |-N| ] [ |-O| ] [ |-P| ] -[ |-Q|\ [*n*][**+z**] ] +[ |-Q|\ [*n*\|\ *length*\ [*unit*]][**+z**] ] [ |-S|\ [**p**\|\ **t**] ] [ |-T|\ [**h**\|\ **l**][**+a**][**+d**\ *gap*\ [/*length*]][**+l**\ [*labels*]] ] [ |SYN_OPT-U| ] diff --git a/src/grdcontour.c b/src/grdcontour.c index 2d041a592f5..142f52eadd2 100644 --- a/src/grdcontour.c +++ b/src/grdcontour.c @@ -172,7 +172,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) { const char *name = gmt_show_name_and_purpose (API, THIS_MODULE_LIB, THIS_MODULE_CLASSIC_NAME, THIS_MODULE_PURPOSE); if (level == GMT_MODULE_PURPOSE) return (GMT_NOERROR); GMT_Usage (API, 0, "usage: %s %s %s [-A[n|[+]|][]] [%s] [-C] " - "[-D