diff --git a/pygmt/figure.py b/pygmt/figure.py index 1d07e8f76f8..e42a3a20a43 100644 --- a/pygmt/figure.py +++ b/pygmt/figure.py @@ -223,7 +223,7 @@ def psconvert(self, icc_gray=False, **kwargs): both an EPS and a PDF file. Using **F** creates a multi-page PDF file from the list of input PS or PDF files. It requires the ``prefix`` parameter. - {V} + {verbose} """ kwargs = self._preprocess(**kwargs) # Default cropping the figure to True diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index 232b54358ea..5e53714e25e 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -14,16 +14,16 @@ from pygmt.exceptions import GMTInvalidInput from pygmt.helpers.utils import is_nonstr_iter -COMMON_OPTIONS = { - "R": r""" +COMMON_DOCSTRINGS = { + "region": r""" region : str or list *xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*]. Specify the :doc:`region ` of interest.""", - "J": r""" + "projection": r""" projection : str *projcode*\[*projparams*/]\ *width*. Select map :doc:`projection `.""", - "A": r""" + "area_thresh": r""" area_thresh : int or float or str *min_area*\ [/*min_level*/*max_level*][**+a**\[**g**\|\ **i**]\ [**s**\|\ **S**]][**+l**\|\ **r**][**+p**\ *percent*]. @@ -31,23 +31,23 @@ hierarchical level that is lower than *min_level* or higher than *max_level* will not be plotted [Default is 0/0/4 (all features)].""", - "B": r""" + "frame": r""" frame : bool or str or list Set map boundary :doc:`frame and axes attributes `. """, - "U": """\ + "timestamp": """\ timestamp : bool or str Draw GMT time stamp logo on plot.""", - "CPT": r""" + "cmap": r""" cmap : str File name of a CPT file or a series of comma-separated colors (e.g., *color1*,\ *color2*,\ *color3*) to build a linear continuous CPT from those colors automatically.""", - "G": """\ + "color": """\ color : str or 1d array Select color or pattern for filling of symbols or polygons. Default is no fill.""", - "I": r""" + "spacing": r""" spacing : str *x_inc*\ [**+e**\|\ **n**][/\ *y_inc*\ [**+e**\|\ **n**]]. *x_inc* [and optionally *y_inc*] is the grid spacing. @@ -78,7 +78,7 @@ **Note**: If ``region=grdfile`` is used then the grid spacing and the registration have already been initialized; use ``spacing`` and ``registration`` to override these values.""", - "V": """\ + "verbose": """\ verbose : bool or str Select verbosity level [Default is **w**], which modulates the messages written to stderr. Choose among 7 levels of verbosity: @@ -90,10 +90,10 @@ - **i** - Informational messages (same as ``verbose=True``) - **c** - Compatibility warnings - **d** - Debugging messages""", - "W": """\ + "pen": """\ pen : str Set pen attributes for lines or the outline of symbols.""", - "XY": r""" + "xyshift": r""" xshift : str [**a**\|\ **c**\|\ **f**\|\ **r**\][*xshift*]. Shift plot origin in x-direction. @@ -102,13 +102,13 @@ Shift plot origin in y-direction. Full documentation is at :gmt-docs:`gmt.html#xy-full`. """, - "a": r""" + "aspatial": r""" aspatial : bool or str [*col*\ =]\ *name*\ [,...]. Control how aspatial data are handled during input and output. Full documentation is at :gmt-docs:`gmt.html#aspatial-full`. """, - "b": r""" + "binary": r""" binary : bool or str **i**\|\ **o**\ [*ncols*][*type*][**w**][**+l**\|\ **b**]. Select native binary input (using ``binary="i"``) or output @@ -136,7 +136,7 @@ be read as little- or big-endian, respectively. Full documentation is at :gmt-docs:`gmt.html#bi-full`.""", - "d": r""" + "nodata": r""" nodata : str **i**\|\ **o**\ *nodata*. Substitute specific values with NaN (for tabular data). For @@ -144,7 +144,7 @@ NaN during input and all NaN values with -9999 during output. Prepend **i** to the *nodata* value for input columns only. Prepend **o** to the *nodata* value for output columns only.""", - "c": r""" + "panel": r""" panel : bool or int or list [*row,col*\|\ *index*]. Select a specific subplot panel. Only allowed when in subplot @@ -154,7 +154,7 @@ when the subplot was defined. **Note**: *row*, *col*, and *index* all start at 0. """, - "e": r""" + "find": r""" find : str [**~**]\ *"pattern"* \| [**~**]/\ *regexp*/[**i**]. Only pass records that match the given *pattern* or regular @@ -162,13 +162,13 @@ the *pattern* or *regexp* to instead only pass data expressions that do not match the pattern. Append **i** for case insensitive matching. This does not apply to headers or segment headers.""", - "f": r""" + "coltypes": r""" coltypes : str [**i**\|\ **o**]\ *colinfo*. Specify data types of input and/or output columns (time or geographical data). Full documentation is at :gmt-docs:`gmt.html#f-full`.""", - "g": r""" + "gap": r""" gap : str or list **x**\|\ **y**\|\ **z**\|\ **d**\|\ **X**\|\ **Y**\|\ **D**\ *gap*\ [**u**][**+a**][**+c**\ *col*][**+n**\|\ **p**]. @@ -209,7 +209,7 @@ column value must exceed *gap* for a break to be imposed. - **+p** - specify that the current value minus the previous value must exceed *gap* for a break to be imposed.""", - "h": r""" + "header": r""" header : str [**i**\|\ **o**][*n*][**+c**][**+d**][**+m**\ *segheader*][**+r**\ *remark*][**+t**\ *title*]. @@ -231,7 +231,7 @@ line-breaks. Blank lines and lines starting with \# are always skipped.""", - "i": r""" + "incols": r""" incols : str or 1d array Specify data columns for primary input in arbitrary order. Columns can be repeated and columns not listed will be skipped [Default @@ -261,7 +261,7 @@ [Default is 1]. - **+o** to add the given *offset* to the input values [Default is 0].""", - "j": r""" + "distcalc": r""" distcalc : str **e**\|\ **f**\|\ **g**. Determine how spherical distances are calculated. @@ -275,11 +275,11 @@ (:gmt-term:`PROJ_MEAN_RADIUS`), and the specification of latitude type (:gmt-term:`PROJ_AUX_LATITUDE`). Geodesic distance calculations is also controlled by method (:gmt-term:`PROJ_GEODESIC`).""", - "l": r""" + "label": r""" label : str Add a legend entry for the symbol or line being plotted. Full documentation is at :gmt-docs:`gmt.html#l-full`.""", - "n": r""" + "interpolation": r""" interpolation : str [**b**\|\ **c**\|\ **l**\|\ **n**][**+a**][**+b**\ *BC*][**+c**][**+t**\ *threshold*]. Select interpolation mode for grids. You can select the type of @@ -289,7 +289,7 @@ - **c** for bicubic [Default] - **l** for bilinear - **n** for nearest-neighbor""", - "o": r""" + "outcols": r""" outcols : str or 1d array *cols*\ [,...][,\ **t**\ [*word*]]. Specify data columns for primary output in arbitrary order. Columns @@ -312,7 +312,7 @@ input and skip trailing text. **Note**: If ``incols`` is also used then the columns given to ``outcols`` correspond to the order after the ``incols`` selection has taken place.""", - "p": r""" + "perspective": r""" perspective : list or str [**x**\|\ **y**\|\ **z**]\ *azim*\[/*elev*\[/*zlevel*]]\ [**+w**\ *lon0*/*lat0*\[/*z0*]][**+v**\ *x0*/*y0*]. @@ -320,13 +320,13 @@ the viewpoint. Default is [180, 90]. Full documentation is at :gmt-docs:`gmt.html#perspective-full`. """, - "r": r""" + "registration": r""" registration : str **g**\|\ **p**. Force gridline (**g**) or pixel (**p**) node registration. [Default is **g**\ (ridline)]. """, - "s": r""" + "skiprows": r""" skiprows : bool or str [*cols*][**+a**][**+r**]. Suppress output for records whose *z*-value equals NaN [Default @@ -342,14 +342,14 @@ - **+a** to suppress the output of the record if just one or more of the columns equal NaN [Default skips record only if values in all specified *cols* equal NaN].""", - "t": """\ + "transparency": """\ transparency : int or float Set transparency level, in [0-100] percent range. Default is 0, i.e., opaque. Only visible when PDF or raster format output is selected. Only the PNG format selection adds a transparency layer in the image (for further processing). """, - "w": r""" + "wrap": r""" wrap : str **y**\|\ **a**\|\ **w**\|\ **d**\|\ **h**\|\ **m**\|\ **s**\|\ **c**\ *period*\ [/*phase*][**+c**\ *col*]. @@ -367,7 +367,7 @@ - **c** - custom cycle (normalized) Full documentation is at :gmt-docs:`gmt.html#w-full`.""", - "x": r""" + "cores": r""" cores : bool or int [[**-**]\ *n*]. Limit the number of cores to be used in any OpenMP-enabled @@ -391,17 +391,6 @@ def fmt_docstring(module_func): * ``{aliases}``: Insert a section listing the parameter aliases defined by decorator ``use_alias``. - The following are places for common parameter descriptions: - - * ``{R}``: region (bounding box as west, east, south, north) - * ``{J}``: projection (coordinate system to use) - * ``{B}``: frame (map frame and axes parameters) - * ``{U}``: timestamp (insert time stamp logo) - * ``{CPT}``: cmap (the color palette table) - * ``{G}``: color - * ``{W}``: pen - * ``{n}``: interpolation - Parameters ---------- module_func : function @@ -426,8 +415,8 @@ def fmt_docstring(module_func): ... data : str or {table-like} ... Pass in either a file name to an ASCII data table, a 2D ... {table-classes}. - ... {R} - ... {J} + ... {region} + ... {projection} ... ... {aliases} ... ''' @@ -481,7 +470,7 @@ def fmt_docstring(module_func): " tabular data" ) - for marker, text in COMMON_OPTIONS.items(): + for marker, text in COMMON_DOCSTRINGS.items(): # Remove the indentation and the first line break from the multiline # strings so that it doesn't mess up the original docstring filler_text[marker] = textwrap.dedent(text.lstrip("\n")) diff --git a/pygmt/src/basemap.py b/pygmt/src/basemap.py index 5fc77d3b912..da7319a835c 100644 --- a/pygmt/src/basemap.py +++ b/pygmt/src/basemap.py @@ -48,12 +48,12 @@ def basemap(self, **kwargs): Parameters ---------- - {J} + {projection} zscale/zsize : float or str Set z-axis scaling or z-axis size. - {R} + {region} *Required if this is the first plot command.* - {B} + {frame} map_scale : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *length*. @@ -82,13 +82,13 @@ def basemap(self, **kwargs): compass : str Draws a map magnetic rose on the map at the location defined by the reference and anchor points - {U} - {V} - {XY} - {c} - {f} - {p} - {t} + {timestamp} + {verbose} + {xyshift} + {panel} + {coltypes} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access if not args_in_kwargs(args=["B", "L", "Td", "Tm", "c"], kwargs=kwargs): diff --git a/pygmt/src/binstats.py b/pygmt/src/binstats.py index 0856dc572de..cee1e6c2cfe 100644 --- a/pygmt/src/binstats.py +++ b/pygmt/src/binstats.py @@ -93,14 +93,14 @@ def binstats(data, **kwargs): computed while the count will be the sum of the weights instead of number of points. If the weights are actually uncertainties (one sigma) then append **+s** and weight = 1/sigma. - {I} - {R} - {V} - {a} - {b} - {h} - {i} - {r} + {spacing} + {region} + {verbose} + {aspatial} + {binary} + {header} + {incols} + {registration} Returns ------- diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index 99422eae4d4..b917d95cb23 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -112,7 +112,7 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): x/y/z : 1d arrays Arrays of x and y coordinates and values z of the data points. - {I} + {spacing} summary : str [**m**\|\ **n**\|\ **s**\|\ **w**]. @@ -123,22 +123,22 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs): - **s** - report the sum of all z-values inside a block - **w** - report the sum of weights - {R} + {region} outfile : str The file name for the output ASCII file. - {V} - {a} - {b} - {d} - {e} - {i} - {f} - {h} - {o} - {r} - {w} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {incols} + {coltypes} + {header} + {outcols} + {registration} + {wrap} Returns ------- @@ -208,24 +208,24 @@ def blockmedian(data=None, x=None, y=None, z=None, outfile=None, **kwargs): x/y/z : 1d arrays Arrays of x and y coordinates and values z of the data points. - {I} + {spacing} - {R} + {region} outfile : str The file name for the output ASCII file. - {V} - {a} - {b} - {d} - {e} - {f} - {h} - {i} - {o} - {r} - {w} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {outcols} + {registration} + {wrap} Returns ------- @@ -295,24 +295,24 @@ def blockmode(data=None, x=None, y=None, z=None, outfile=None, **kwargs): x/y/z : 1d arrays Arrays of x and y coordinates and values z of the data points. - {I} + {spacing} - {R} + {region} outfile : str The file name for the output ASCII file. - {V} - {a} - {b} - {d} - {e} - {f} - {h} - {i} - {o} - {r} - {w} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {outcols} + {registration} + {wrap} Returns ------- diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index 16d20781bae..683d345d657 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -63,11 +63,11 @@ def coast(self, **kwargs): Parameters ---------- - {J} - {R} + {projection} + {region} *Required if this is the first plot command.* - {A} - {B} + {area_thresh} + {frame} lakes : str or list *fill*\ [**+l**\|\ **+r**]. Set the shade, color, or pattern for lakes and river-lakes. The @@ -148,7 +148,7 @@ def coast(self, **kwargs): a = All boundaries (1-3) water : str Select filling or clipping of "wet" areas. - {U} + {timestamp} shorelines : int or str or list [*level*\ /]\ *pen*. Draw shorelines [Default is no shorelines]. Append pen attributes @@ -176,11 +176,11 @@ def coast(self, **kwargs): [Default is no fill]. Append **+l**\|\ **+L** to =\ *continent* to only list countries in that continent; repeat if more than one continent is requested. - {XY} - {c} - {p} - {t} - {V} + {xyshift} + {panel} + {perspective} + {transparency} + {verbose} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access if not args_in_kwargs(args=["C", "G", "S", "I", "N", "E", "Q", "W"], kwargs=kwargs): diff --git a/pygmt/src/colorbar.py b/pygmt/src/colorbar.py index 12f77219e03..c9f1e811714 100644 --- a/pygmt/src/colorbar.py +++ b/pygmt/src/colorbar.py @@ -47,7 +47,7 @@ def colorbar(self, **kwargs): ---------- frame : str or list Set color bar boundary frame, labels, and axes attributes. - {CPT} + {cmap} position : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ [**+w**\ *length*\ [/\ *width*]]\ [**+e**\ [**b**\|\ **f**][*length*]]\ @@ -99,11 +99,11 @@ def colorbar(self, **kwargs): used. Alternatively, set ``shading=[low, high]`` to specify an asymmetric intensity range from *low* to *high*. [Default is no illumination]. - {V} - {XY} - {c} - {p} - {t} + {verbose} + {xyshift} + {panel} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/contour.py b/pygmt/src/contour.py index b8085023346..8e0348675ca 100644 --- a/pygmt/src/contour.py +++ b/pygmt/src/contour.py @@ -55,15 +55,15 @@ def contour(self, data=None, x=None, y=None, z=None, **kwargs): {table-classes} x/y/z : 1d arrays Arrays of x and y coordinates and values z of the data points. - {J} - {R} + {projection} + {region} annotation : str or int Specify or disable annotated contour levels, modifies annotated contours specified in ``interval``. - Specify a fixed annotation interval *annot_int* or a single annotation level +\ *annot_int*. - {B} + {frame} levels : str or int Specify the contour lines to generate. @@ -96,7 +96,7 @@ def contour(self, data=None, x=None, y=None, z=None, **kwargs): skip : bool or str [**p**\|\ **t**]. Skip input points outside region. - {W} + {pen} label : str Add a legend entry for the contour being plotted. Normally, the annotated contour is selected for the legend. You can select the @@ -104,18 +104,18 @@ def contour(self, data=None, x=None, y=None, z=None, **kwargs): to be of the format [*annotcontlabel*][/*contlabel*]. If either label contains a slash (/) character then use ``|`` as the separator for the two labels instead. - {U} - {V} - {XY} - {b} - {c} - {d} - {e} - {f} - {h} - {i} - {p} - {t} + {timestamp} + {verbose} + {xyshift} + {binary} + {panel} + {nodata} + {find} + {coltypes} + {header} + {incols} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/dimfilter.py b/pygmt/src/dimfilter.py index 116d4040ec0..e8998cd528b 100644 --- a/pygmt/src/dimfilter.py +++ b/pygmt/src/dimfilter.py @@ -116,7 +116,7 @@ def dimfilter(grid, **kwargs): region : str or list [*xmin*, *xmax*, *ymin*, *ymax*]. Defines the region of the output points. [Default: Same as input.] - {V} + {verbose} Returns ------- diff --git a/pygmt/src/grd2cpt.py b/pygmt/src/grd2cpt.py index 4bb5542f1cc..8452c3f1fee 100644 --- a/pygmt/src/grd2cpt.py +++ b/pygmt/src/grd2cpt.py @@ -158,7 +158,7 @@ def grd2cpt(grid, **kwargs): Produce a wrapped (cyclic) color table that endlessly repeats its range. Note that ``cyclic=True`` cannot be set together with ``categorical=True``. - {V} + {verbose} """ if kwargs.get("W") is not None and kwargs.get("Ww") is not None: raise GMTInvalidInput("Set only categorical or cyclic to True, not both.") diff --git a/pygmt/src/grd2xyz.py b/pygmt/src/grd2xyz.py index 774cfa20c44..85e4065c2b4 100644 --- a/pygmt/src/grd2xyz.py +++ b/pygmt/src/grd2xyz.py @@ -65,7 +65,7 @@ def grd2xyz(grid, output_type="pandas", outfile=None, **kwargs): **f** to start at 1 (Fortran-style counting). Alternatively, append **i** to write just the two columns *index* and *z*, where *index* is the 1-D indexing that GMT uses when referring to grid nodes. - {R} + {region} Adding ``region`` will select a subsection of the grid. If this subsection exceeds the boundaries of the grid, only the common region will be output. @@ -80,7 +80,7 @@ def grd2xyz(grid, output_type="pandas", outfile=None, **kwargs): this by appending **+u**\ *unit*. For such grids, the area varies with latitude and also sees special cases for gridline-registered layouts at sides, corners, and poles. - {V} + {verbose} convention : str [*flags*]. Write a 1-column ASCII [or binary] table. Output will be organized @@ -111,12 +111,12 @@ def grd2xyz(grid, output_type="pandas", outfile=None, **kwargs): * **d** 8-byte floating point double precision Default format is scanline orientation of ASCII numbers: **TLa**. - {b} - {d} - {f} - {h} - {o} - {s} + {binary} + {nodata} + {coltypes} + {header} + {outcols} + {skiprows} Returns ------- diff --git a/pygmt/src/grdclip.py b/pygmt/src/grdclip.py index 98b73381f10..c43104399dd 100644 --- a/pygmt/src/grdclip.py +++ b/pygmt/src/grdclip.py @@ -55,7 +55,7 @@ def grdclip(grid, **kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {R} + {region} above : str or list or tuple [*high*, *above*]. Set all data[i] > *high* to *above*. @@ -69,7 +69,7 @@ def grdclip(grid, **kwargs): [*old*, *new*]. Set all data[i] == *old* to *new*. This is mostly useful when your data are known to be integer values. - {V} + {verbose} Returns ------- diff --git a/pygmt/src/grdcontour.py b/pygmt/src/grdcontour.py index 0893ff32954..b520491bd23 100644 --- a/pygmt/src/grdcontour.py +++ b/pygmt/src/grdcontour.py @@ -71,21 +71,21 @@ def grdcontour(self, grid, **kwargs): Do not draw contours with less than `cut` number of points. resample : str or int Resample smoothing factor. - {J} - {R} - {B} + {projection} + {region} + {frame} label_placement : str [**d**\|\ **f**\|\ **n**\|\ **l**\|\ **L**\|\ **x**\|\ **X**]\ *args*. Control the placement of labels along the quoted lines. It supports five controlling algorithms. See :gmt-docs:`grdcontour.html#g` for details. - {U} - {V} - {W} - {XY} - {c} - {f} + {timestamp} + {verbose} + {pen} + {xyshift} + {panel} + {coltypes} label : str Add a legend entry for the contour being plotted. Normally, the annotated contour is selected for the legend. You can select the @@ -93,8 +93,8 @@ def grdcontour(self, grid, **kwargs): to be of the format [*annotcontlabel*][/*contlabel*]. If either label contains a slash (/) character then use ``|`` as the separator for the two labels instead. - {p} - {t} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index ce0927d14e5..20153c4a7fd 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -51,8 +51,8 @@ def grdcut(grid, **kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {J} - {R} + {projection} + {region} extend : bool or int or float Allow grid to be extended if new ``region`` exceeds existing boundaries. Give a value to initialize nodes outside current region. @@ -78,8 +78,8 @@ def grdcut(grid, **kwargs): considering the range of the core subset for further reduction of the area. - {V} - {f} + {verbose} + {coltypes} Returns ------- diff --git a/pygmt/src/grdfill.py b/pygmt/src/grdfill.py index 088f52c4c7d..3878d5999ea 100644 --- a/pygmt/src/grdfill.py +++ b/pygmt/src/grdfill.py @@ -53,8 +53,8 @@ def grdfill(grid, **kwargs): **s** for bicubic spline (optionally append a *tension* parameter [Default is no tension]). - {R} - {V} + {region} + {verbose} Returns ------- diff --git a/pygmt/src/grdfilter.py b/pygmt/src/grdfilter.py index 099dc610961..1cecd682405 100644 --- a/pygmt/src/grdfilter.py +++ b/pygmt/src/grdfilter.py @@ -97,18 +97,18 @@ def grdfilter(grid, **kwargs): 5: grid (x,y) in Mercator ``projection="m1"`` img units, *width* in km, Spherical distance calculation. - {I} + {spacing} nans : str or float **i**\|\ **p**\|\ **r**. Determine how NaN-values in the input grid affects the filtered output. - {R} + {region} toggle : bool Toggle the node registration for the output grid so as to become the opposite of the input grid. [Default gives the same registration as the input grid]. - {V} - {f} - {r} + {verbose} + {coltypes} + {registration} Returns ------- diff --git a/pygmt/src/grdgradient.py b/pygmt/src/grdgradient.py index 1d0c3435149..66c4930bbcf 100644 --- a/pygmt/src/grdgradient.py +++ b/pygmt/src/grdgradient.py @@ -134,13 +134,13 @@ def grdgradient(grid, **kwargs): grid output is not needed for this run then do not specify ``outgrid``. For subsequent runs, just use **r** to read these values. Using **R** will read then delete the statistics file. - {R} + {region} slope_file : str Name of output grid file with scalar magnitudes of gradient vectors. Requires ``direction`` but makes ``outgrid`` optional. - {V} - {f} - {n} + {verbose} + {coltypes} + {interpolation} Returns ------- diff --git a/pygmt/src/grdhisteq.py b/pygmt/src/grdhisteq.py index 0e4d9cb0ef6..492890d0314 100644 --- a/pygmt/src/grdhisteq.py +++ b/pygmt/src/grdhisteq.py @@ -89,9 +89,9 @@ def _grdhisteq(grid, output_type, **kwargs): divisions : int Set the number of divisions of the data range [Default is 16]. - {R} - {V} - {h} + {region} + {verbose} + {header} Returns ------- @@ -176,8 +176,8 @@ def equalize_grid( range. quadratic: bool Perform quadratic equalization [Default is linear]. - {R} - {V} + {region} + {verbose} Returns ------- @@ -278,9 +278,9 @@ def compute_bins( Set the number of divisions of the data range. quadratic : bool Perform quadratic equalization [Default is linear]. - {R} - {V} - {h} + {region} + {verbose} + {header} Returns ------- diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index 467d7d66f2a..1aa4a715b24 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -99,8 +99,8 @@ def grdimage(self, grid, **kwargs): is selected then we will write a GeoTiff image if the GMT projection syntax translates into a PROJ syntax, otherwise a plain tiff file is produced. (2) Any vector elements will be lost. - {B} - {CPT} + {frame} + {cmap} img_in : str [**r**]. GMT will automatically detect standard image files (Geotiff, TIFF, @@ -141,7 +141,7 @@ def grdimage(self, grid, **kwargs): suitable modifiers [Default is no illumination]. **Note**: If the input data is an *image* then an *intensfile* or constant *intensity* must be provided. - {J} + {projection} monochrome : bool Force conversion to monochrome image using the (television) YIQ transformation. Cannot be used with ``nan_transparent``. @@ -152,15 +152,15 @@ def grdimage(self, grid, **kwargs): Make grid nodes with z = NaN transparent, using the color-masking feature in PostScript Level 3 (the PS device must support PS Level 3). - {R} - {V} - {XY} - {c} - {f} - {n} - {p} - {t} - {x} + {region} + {verbose} + {xyshift} + {panel} + {coltypes} + {interpolation} + {perspective} + {transparency} + {cores} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/grdinfo.py b/pygmt/src/grdinfo.py index 120e4c2df7e..3bff1f13784 100644 --- a/pygmt/src/grdinfo.py +++ b/pygmt/src/grdinfo.py @@ -40,7 +40,7 @@ def grdinfo(grid, **kwargs): grid : str or xarray.DataArray The file name of the input grid or the grid loaded as a DataArray. This is the only required parameter. - {R} + {region} per_column : str or bool **n**\|\ **t**. Formats the report using tab-separated fields on a single line. The @@ -102,8 +102,8 @@ def grdinfo(grid, **kwargs): minus/plus the max absolute value of the two extremes, append **+s**\ . We report the result via the text string *zmin/zmax* or *zmin/zmax/dz* (if *dz* was given) as expected by :func:`pygmt.makecpt`. - {V} - {f} + {verbose} + {coltypes} Returns ------- diff --git a/pygmt/src/grdlandmask.py b/pygmt/src/grdlandmask.py index 1a9f49ef159..8e6415cff0e 100644 --- a/pygmt/src/grdlandmask.py +++ b/pygmt/src/grdlandmask.py @@ -48,9 +48,9 @@ def grdlandmask(**kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {I} - {R} - {A} + {spacing} + {region} + {area_thresh} resolution : str *res*\[\ **+f**\]. Selects the resolution of the data set to use ((**f**)ull, (**h**)igh, (**i**)ntermediate, (**l**)ow, or @@ -82,8 +82,8 @@ def grdlandmask(**kwargs): [Default is [0, 1, 0, 1, 0] (i.e., [0, 1])]. Also select ``bordervalues`` to let nodes exactly on feature boundaries be considered outside [Default is inside]. - {V} - {r} + {verbose} + {registration} Returns ------- diff --git a/pygmt/src/grdproject.py b/pygmt/src/grdproject.py index e5e2289223d..2c1c2267487 100644 --- a/pygmt/src/grdproject.py +++ b/pygmt/src/grdproject.py @@ -64,8 +64,8 @@ def grdproject(grid, **kwargs): inverse : bool When set to ``True`` transforms grid from rectangular to geographical [Default is False]. - {J} - {R} + {projection} + {region} center : str or list [*dx*, *dy*]. Let projected coordinates be relative to projection center [Default @@ -73,7 +73,7 @@ def grdproject(grid, **kwargs): projected units to be added (or subtracted when ``inverse`` is set) to (from) the projected coordinates, such as false eastings and northings for particular projection zones [0/0]. - {I} + {spacing} dpi : int Set the resolution for the new grid in dots per inch. scaling : str @@ -86,9 +86,9 @@ def grdproject(grid, **kwargs): unit : str Append **c**, **i**, or **p** to indicate that cm, inch, or point should be the projected measure unit. Cannot be used with ``scaling``. - {V} - {n} - {r} + {verbose} + {interpolation} + {registration} Returns ------- diff --git a/pygmt/src/grdsample.py b/pygmt/src/grdsample.py index 83b32c08268..9dc6872f640 100644 --- a/pygmt/src/grdsample.py +++ b/pygmt/src/grdsample.py @@ -56,18 +56,18 @@ def grdsample(grid, **kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {I} - {R} + {spacing} + {region} translate : bool Translate between grid and pixel registration; if the input is grid-registered, the output will be pixel-registered and vice-versa. registration : str or bool [**g**\|\ **p**\ ]. Set registration to **g**\ ridline or **p**\ ixel. - {V} - {f} - {n} - {x} + {verbose} + {coltypes} + {interpolation} + {cores} Returns ------- diff --git a/pygmt/src/grdtrack.py b/pygmt/src/grdtrack.py index edabd4554af..b97c78ac081 100644 --- a/pygmt/src/grdtrack.py +++ b/pygmt/src/grdtrack.py @@ -186,7 +186,7 @@ def grdtrack(grid, points=None, newcolname=None, outfile=None, **kwargs): nearest distance nodes along the cross-profiles. We write 13 output columns per track: *dist, lonc, latc, distc, azimuthc, zc, lonl, latl, distl, lonr, latr, distr, width*. - {R} + {region} no_skip : bool Do *not* skip points that fall outside the domain of the grid(s) [Default only output points within grid domain]. @@ -244,22 +244,22 @@ def grdtrack(grid, points=None, newcolname=None, outfile=None, **kwargs): spherical degrees. Use *radius* to change the unit and give *radius* = 0 if you do not want to limit the radius search. To instead replace the input point with the coordinates of the nearest node, append **+p**. - {V} + {verbose} z_only : bool Only write out the sampled z-values [Default writes all columns]. - {a} - {b} - {d} - {e} - {f} - {g} - {h} - {i} - {j} - {n} - {o} - {s} - {w} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {distcalc} + {interpolation} + {outcols} + {skiprows} + {wrap} Returns ------- diff --git a/pygmt/src/grdview.py b/pygmt/src/grdview.py index 1198efc4aa9..335f3e5317e 100644 --- a/pygmt/src/grdview.py +++ b/pygmt/src/grdview.py @@ -65,10 +65,10 @@ def grdview(self, grid, **kwargs): When used with ``perspective``, optionally append */zmin/zmax* to indicate the range to use for the 3-D axes [Default is the region in the input grid]. - {J} + {projection} zscale/zsize : float or str Set z-axis scaling or z-axis size. - {B} + {frame} cmap : str The name of the color palette table to use. drapegrid : str or xarray.DataArray @@ -113,13 +113,13 @@ def grdview(self, grid, **kwargs): specify azimuth, intensity, and ambient arguments for that function, or just give **+d** to select the default arguments [Default is **+a**\ -45\ **+nt**\ 1\ **+m**\ 0]. - {V} - {XY} - {c} - {f} - {n} - {p} - {t} + {verbose} + {xyshift} + {panel} + {coltypes} + {interpolation} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/grdvolume.py b/pygmt/src/grdvolume.py index c4374af7575..11ec856a8f3 100644 --- a/pygmt/src/grdvolume.py +++ b/pygmt/src/grdvolume.py @@ -64,8 +64,8 @@ def grdvolume(grid, output_type="pandas", outfile=None, **kwargs): between two contours. If no *contour* is given then there is no contour and the entire grid area, volume and the mean height is returned and *cval* will be reported as 0. - {R} - {V} + {region} + {verbose} Returns ------- diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index 84e872ca774..ed332dc1004 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -55,13 +55,13 @@ def histogram(self, data, **kwargs): data : str or list or {table-like} Pass in either a file name to an ASCII data table, a Python list, a 2D {table-classes}. - {J} - {R} - {B} - {CPT} - {G} - {W} - {c} + {projection} + {region} + {frame} + {cmap} + {color} + {pen} + {panel} annotate : bool or str [**+b**][**+f**\ *font*][**+o**\ *off*][**+r**]. Annotate each bar with the count it represents. Append any of the @@ -124,18 +124,18 @@ def histogram(self, data, **kwargs): To use weights provided as a second data column instead of pure counts, append **+w**. - {XY} - {U} - {V} - {b} - {d} - {e} - {h} - {i} - {l} - {p} - {t} - {w} + {xyshift} + {timestamp} + {verbose} + {binary} + {nodata} + {find} + {header} + {incols} + {label} + {perspective} + {transparency} + {wrap} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/image.py b/pygmt/src/image.py index 3e64daa91de..f5952d36785 100644 --- a/pygmt/src/image.py +++ b/pygmt/src/image.py @@ -40,8 +40,8 @@ def image(self, imagefile, **kwargs): raster file can have a depth of 1, 8, 24, or 32 bits and is read via GDAL. **Note**: If GDAL was not configured during GMT installation then only EPS files are supported. - {J} - {R} + {projection} + {region} position : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+r**\ *dpi*\ **+w**\ [**-**]\ *width*\ [/*height*]\ [**+j**\ *justify*]\ @@ -55,12 +55,12 @@ def image(self, imagefile, **kwargs): monochrome : bool Convert color image to monochrome grayshades using the (television) YIQ-transformation. - {U} - {V} - {XY} - {c} - {p} - {t} + {timestamp} + {verbose} + {xyshift} + {panel} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 940ae2d7850..98d78330f1e 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -64,11 +64,11 @@ def info(data, **kwargs): Report the min/max of the first (0'th) column to the nearest multiple of dz and output this in the form ``[zmin, zmax, dz]``. - {V} - {a} - {i} - {f} - {r} + {verbose} + {aspatial} + {incols} + {coltypes} + {registration} Returns ------- diff --git a/pygmt/src/inset.py b/pygmt/src/inset.py index b005d5ee5a7..e040362f1dc 100644 --- a/pygmt/src/inset.py +++ b/pygmt/src/inset.py @@ -106,9 +106,9 @@ def inset(self, **kwargs): no_clip : bool Do NOT clip features extruding outside map inset boundaries [Default is clip]. - {R} - {J} - {V} + {region} + {projection} + {verbose} Examples -------- diff --git a/pygmt/src/legend.py b/pygmt/src/legend.py index 3299772ac29..e783063e9da 100644 --- a/pygmt/src/legend.py +++ b/pygmt/src/legend.py @@ -48,8 +48,8 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg Either ``None`` [Default] for using the automatically generated legend specification file, or a *filename* pointing to the legend specification file. - {J} - {R} + {projection} + {region} position : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *width*\ [/*height*]\ [**+j**\ *justify*]\ [**+l**\ *spacing*]\ @@ -65,12 +65,12 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg using :gmt-term:`MAP_FRAME_PEN`. By default, uses **+g**\ white\ **+p**\ 1p which draws a box around the legend using a 1p black pen and adds a white background. - {U} - {V} - {XY} - {c} - {p} - {t} + {timestamp} + {verbose} + {xyshift} + {panel} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/logo.py b/pygmt/src/logo.py index 45be41194da..afae0536b10 100644 --- a/pygmt/src/logo.py +++ b/pygmt/src/logo.py @@ -36,8 +36,8 @@ def logo(self, **kwargs): Parameters ---------- - {J} - {R} + {projection} + {region} position : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *width*\ [**+j**\ *justify*]\ [**+o**\ *dx*\ [/*dy*]]. @@ -53,11 +53,11 @@ def logo(self, **kwargs): [Default] - **n** to skip the label placement - **u** to place the URL to the GMT site - {U} - {V} - {XY} - {c} - {t} + {timestamp} + {verbose} + {xyshift} + {panel} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index 37494003881..115eb088e47 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -135,7 +135,7 @@ def makecpt(**kwargs): continuous : bool Force a continuous CPT when building from a list of colors and a list of z-values [Default is None, i.e. discrete values]. - {V} + {verbose} categorical : bool Do not interpolate the input color table but pick the output colors starting at the beginning of the color table, until colors for all diff --git a/pygmt/src/meca.py b/pygmt/src/meca.py index 6d660c1c883..b80061a4862 100644 --- a/pygmt/src/meca.py +++ b/pygmt/src/meca.py @@ -215,14 +215,14 @@ def meca( no_clip : bool Does NOT skip symbols that fall outside frame boundary specified by *region* [Default is False, i.e. plot symbols inside map frame only]. - {J} - {R} - {B} - {V} - {XY} - {c} - {p} - {t} + {projection} + {region} + {frame} + {verbose} + {xyshift} + {panel} + {perspective} + {transparency} """ # pylint: disable=too-many-arguments,too-many-locals,too-many-branches kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/nearneighbor.py b/pygmt/src/nearneighbor.py index 47c91d5aa2d..1b1aa6c41b7 100644 --- a/pygmt/src/nearneighbor.py +++ b/pygmt/src/nearneighbor.py @@ -84,9 +84,9 @@ def nearneighbor(data=None, x=None, y=None, z=None, **kwargs): x/y/z : 1d arrays Arrays of x and y coordinates and values z of the data points. - {I} + {spacing} - {R} + {region} search_radius : str Sets the search radius that determines which data points are considered @@ -113,17 +113,17 @@ def nearneighbor(data=None, x=None, y=None, z=None, **kwargs): Alternatively, use ``sectors="n"`` to call GDAL's nearest neighbor algorithm instead. - {V} - {a} - {b} - {d} - {e} - {f} - {g} - {h} - {i} - {r} - {w} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {registration} + {wrap} Returns ------- diff --git a/pygmt/src/plot.py b/pygmt/src/plot.py index dec85be8c78..7d4cd5afc96 100644 --- a/pygmt/src/plot.py +++ b/pygmt/src/plot.py @@ -94,8 +94,8 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): should be a list of two 1d arrays with the vector directions. These can be angle and length, azimuth and length, or x and y components, depending on the style options chosen. - {J} - {R} + {projection} + {region} straight_line : bool or str [**m**\|\ **p**\|\ **x**\|\ **y**]. By default, geographic line segments are drawn as great circle @@ -107,8 +107,8 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): simply connected, unless you append **x** or **y** to draw stair-case curves that whose first move is along *x* or *y*, respectively. - {B} - {CPT} + {frame} + {cmap} offset : str *dx*/*dy*. Offset the plot symbol or line locations by the given amounts @@ -151,7 +151,7 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): Instead of the codes **a**\|\ **f**\|\ **s**\|\ **r** you may append the coordinates of a *refpoint* which will serve as a fixed external reference point for all groups. - {G} + {color} *color* can be a 1d array, but it is only valid if using ``x``/``y`` and ``cmap=True`` is also required. intensity : float or bool or 1d array @@ -181,10 +181,10 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): style : str Plot symbols (including vectors, pie slices, fronts, decorated or quoted lines). - {W} - {U} - {V} - {XY} + {pen} + {timestamp} + {verbose} + {xyshift} zvalue : str *value*\|\ *file*. Instead of specifying a symbol or polygon fill and outline color @@ -194,21 +194,21 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs): polygon in the input data. To apply it to the fill color, use ``color="+z"``. To apply it to the pen color, append **+z** to ``pen``. - {a} - {b} - {c} - {d} - {e} - {f} - {g} - {h} - {i} - {l} - {p} - {t} + {aspatial} + {binary} + {panel} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {label} + {perspective} + {transparency} *transparency* can also be a 1d array to set varying transparency for symbols, but this option is only valid if using x/y. - {w} + {wrap} """ # pylint: disable=too-many-locals kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/plot3d.py b/pygmt/src/plot3d.py index bb2bd18f9a4..dab0200f41e 100644 --- a/pygmt/src/plot3d.py +++ b/pygmt/src/plot3d.py @@ -95,10 +95,10 @@ def plot3d( should be a list of two 1d arrays with the vector directions. These can be angle and length, azimuth and length, or x and y components, depending on the style options chosen. - {J} + {projection} zscale/zsize : float or str Set z-axis scaling or z-axis size. - {R} + {region} straight_line : bool or str [**m**\|\ **p**\|\ **x**\|\ **y**]. By default, geographic line segments are drawn as great circle @@ -111,13 +111,13 @@ def plot3d( stair-case curves that whose first move is along *x* or *y*, respectively. **Note**: The ``straight_line`` parameter requires constant *z*-coordinates. - {B} - {CPT} + {frame} + {cmap} offset : str *dx*/*dy*\ [/*dz*]. Offset the plot symbol or line locations by the given amounts *dx*/*dy*\ [/*dz*] [Default is no offset]. - {G} + {color} *color* can be a 1d array, but it is only valid if using ``x``/``y`` and ``cmap=True`` is also required. intensity : float or bool or 1d array @@ -151,10 +151,10 @@ def plot3d( the foreground are plotted after items in the background. style : str Plot symbols. Full documentation is at :gmt-docs:`plot3d.html#s`. - {U} - {V} - {W} - {XY} + {timestamp} + {verbose} + {pen} + {xyshift} zvalue : str *value*\|\ *file*. Instead of specifying a symbol or polygon fill and outline color @@ -164,21 +164,21 @@ def plot3d( polygon in the input data. To apply it to the fill color, use ``color="+z"``. To apply it to the pen color, append **+z** to ``pen``. - {a} - {b} - {c} - {d} - {e} - {f} - {g} - {h} - {i} - {l} - {p} - {t} + {aspatial} + {binary} + {panel} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {label} + {perspective} + {transparency} *transparency* can also be a 1d array to set varying transparency for symbols, but this option is only valid if using x/y/z. - {w} + {wrap} """ # pylint: disable=too-many-locals kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/project.py b/pygmt/src/project.py index a20122f7ad3..c8ba67129c0 100644 --- a/pygmt/src/project.py +++ b/pygmt/src/project.py @@ -170,7 +170,7 @@ def project(data=None, x=None, y=None, z=None, outfile=None, **kwargs): Set the position of the rotation pole of the projection. (Definition 3). - {V} + {verbose} width : str or list *w_min*/*w_max*. @@ -198,7 +198,7 @@ def project(data=None, x=None, y=None, z=None, outfile=None, **kwargs): outfile : str The file name for the output ASCII file. - {f} + {coltypes} Returns ------- diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index b1426b42dfa..76226058fcf 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -184,18 +184,18 @@ def rose(self, data=None, length=None, azimuth=None, **kwargs): Statistics, *J. Stat. Software*, 31(10), 1-21, https://doi.org/10.18637/jss.v031.i10. - {U} - {V} - {XY} - {b} - {c} - {d} - {e} - {h} - {i} - {p} - {t} - {w} + {timestamp} + {verbose} + {xyshift} + {binary} + {panel} + {nodata} + {find} + {header} + {incols} + {perspective} + {transparency} + {wrap} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/select.py b/pygmt/src/select.py index 7485485b466..600a732aec4 100644 --- a/pygmt/src/select.py +++ b/pygmt/src/select.py @@ -69,7 +69,7 @@ def select(data=None, outfile=None, **kwargs): {table-classes}. outfile : str The file name for the output ASCII file. - {A} + {area_thresh} resolution : str *resolution*\ [**+f**]. Ignored unless ``mask`` is set. Selects the resolution of the coastline @@ -97,7 +97,7 @@ def select(data=None, outfile=None, **kwargs): (and ``area_thresh``, ``resolution``). - **z** select records NOT within the range specified by ``z_subregion``. - {J} + {projection} mask : str or list Pass all records whose location is inside specified geographical features. Specify if records should be skipped (s) or kept (k) using @@ -108,8 +108,8 @@ def select(data=None, outfile=None, **kwargs): [Default is s/k/s/k/s (i.e., s/k), which passes all points on dry land]. - {R} - {V} + {region} + {verbose} z_subregion : str *min*\ [/*max*]\ [**+a**]\ [**+c**\ *col*]\ [**+i**]. Pass all records whose 3rd column (*z*; *col* = 2) lies within the @@ -129,17 +129,17 @@ def select(data=None, outfile=None, **kwargs): and **+i** reverses the tests to pass record with *z* value NOT in the given range. Finally, if **+c** is not used then it is automatically incremented for each new ``z_subregion`` option, starting with 2. - {b} - {d} - {e} - {f} - {g} - {h} - {i} - {o} - {r} - {s} - {w} + {binary} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {outcols} + {registration} + {skiprows} + {wrap} Returns ------- diff --git a/pygmt/src/solar.py b/pygmt/src/solar.py index 774e6e9381e..31148e502de 100644 --- a/pygmt/src/solar.py +++ b/pygmt/src/solar.py @@ -49,20 +49,20 @@ def solar(self, terminator="d", terminator_datetime=None, **kwargs): Set the UTC date and time of the displayed terminator. It can be passed as a string or Python datetime object. [Default is the current UTC date and time] - {R} - {J} - {B} + {region} + {projection} + {frame} fill : str Color or pattern for filling of terminators. pen : str Set pen attributes for lines. The default pen is ``"0.25p,black,solid"``. - {U} - {V} - {XY} - {c} - {p} - {t} + {timestamp} + {verbose} + {xyshift} + {panel} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/sph2grd.py b/pygmt/src/sph2grd.py index 2e6caae3360..35636c5c24f 100644 --- a/pygmt/src/sph2grd.py +++ b/pygmt/src/sph2grd.py @@ -48,14 +48,14 @@ def sph2grd(data, **kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {I} - {R} - {V} - {b} - {h} - {i} - {r} - {x} + {spacing} + {region} + {verbose} + {binary} + {header} + {incols} + {registration} + {cores} Returns ------- diff --git a/pygmt/src/sphdistance.py b/pygmt/src/sphdistance.py index 264ffd3dcb8..b1738e56341 100644 --- a/pygmt/src/sphdistance.py +++ b/pygmt/src/sphdistance.py @@ -55,9 +55,9 @@ def sphdistance(data=None, x=None, y=None, **kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {I} - {R} - {V} + {spacing} + {region} + {verbose} single_form : bool For large data sets you can save some memory (at the expense of more processing) by only storing one form of location coordinates diff --git a/pygmt/src/sphinterpolate.py b/pygmt/src/sphinterpolate.py index 551f9c62be2..5d1250cf8ff 100644 --- a/pygmt/src/sphinterpolate.py +++ b/pygmt/src/sphinterpolate.py @@ -45,9 +45,9 @@ def sphinterpolate(data, **kwargs): outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. - {I} - {R} - {V} + {spacing} + {region} + {verbose} Returns ------- diff --git a/pygmt/src/subplot.py b/pygmt/src/subplot.py index 4b683b8fb79..828b38e11d6 100644 --- a/pygmt/src/subplot.py +++ b/pygmt/src/subplot.py @@ -83,7 +83,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs): typeset your tag numbers using lowercase Roman numerals; use **+R** for uppercase Roman numerals [Arabic numerals]. Append **+v** to increase tag numbers vertically down columns [horizontally across rows]. - {B} + {frame} clearance : str or list [*side*]\ *clearance*. Reserve a space of dimension *clearance* between the margin and the @@ -96,7 +96,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs): side and 2 cm on south side). Such space will be left untouched by the main map plotting but can be accessed by methods that plot scales, bars, text, etc. - {J} + {projection} margins : str or list This is margin space that is added between neighboring subplots (i.e., the interior margins) in addition to the automatic space added for tick @@ -112,7 +112,7 @@ def subplot(self, nrows=1, ncols=1, **kwargs): opposing sides (e.g., east plus west or south plus north margins) [Default is half the primary annotation font size, giving the full annotation font size as the default gap]. - {R} + {region} sharex : bool or str Set subplot layout for shared x-axes. Use when all subplots in a column share a common *x*-range. If ``sharex=True``, the first (i.e., @@ -145,8 +145,8 @@ def subplot(self, nrows=1, ncols=1, **kwargs): While individual subplots can have titles (see ``sharex``/``sharey`` or ``frame``), the entire figure may also have an overarching *heading* [no heading]. Font is determined by setting :gmt-term:`FONT_HEADING`. - {V} - {XY} + {verbose} + {xyshift} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access @@ -216,7 +216,7 @@ def set_panel(self, panel=None, **kwargs): clearances set by ``clearance`` in the initial :meth:`pygmt.Figure.subplot` call. - {V} + {verbose} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access # convert tuple or list to comma-separated str diff --git a/pygmt/src/surface.py b/pygmt/src/surface.py index e2c242c315e..21e07fbb3ef 100644 --- a/pygmt/src/surface.py +++ b/pygmt/src/surface.py @@ -61,24 +61,24 @@ def surface(data=None, x=None, y=None, z=None, **kwargs): x/y/z : 1d arrays Arrays of x and y coordinates and values z of the data points. - {I} + {spacing} - {R} + {region} outgrid : str Optional. The file name for the output netcdf file with extension .nc to store the grid in. - {V} - {a} - {b} - {d} - {e} - {f} - {h} - {i} - {r} - {w} + {verbose} + {aspatial} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} + {wrap} Returns ------- diff --git a/pygmt/src/ternary.py b/pygmt/src/ternary.py index c52050d8c0f..1cb8f2fe426 100644 --- a/pygmt/src/ternary.py +++ b/pygmt/src/ternary.py @@ -52,18 +52,18 @@ def ternary(self, data, **kwargs): [*amin*, *amax*, *bmin*, *bmax*, *cmin*, *cmax*]. Give the min and max limits for each of the three axes **a**, **b**, and **c**. - {CPT} - {G} + {cmap} + {color} style : str *symbol*\[\ *size*]. Plot individual symbols in a ternary diagram. - {W} - {XY} - {U} - {V} - {c} - {p} - {t} + {pen} + {xyshift} + {timestamp} + {verbose} + {panel} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access with Session() as lib: diff --git a/pygmt/src/text.py b/pygmt/src/text.py index 2cde7480d19..682a3526380 100644 --- a/pygmt/src/text.py +++ b/pygmt/src/text.py @@ -114,8 +114,8 @@ def text_( **T**, **M**, **B** for top, middle, or bottom. E.g., **BL** for lower left. If no justification is explicitly given (i.e. ``justify=True``), then the input to ``textfiles`` must have this as a column. - {J} - {R} + {projection} + {region} *Required if this is the first plot command.* clearance : str [*dx/dy*][**+to**\|\ **O**\|\ **c**\|\ **C**]. @@ -148,20 +148,20 @@ def text_( style = solid]. no_clip : bool Do NOT clip text at map boundaries [Default is will clip]. - {U} - {V} - {XY} - {a} - {c} - {e} - {f} - {h} - {i} - {p} - {t} + {timestamp} + {verbose} + {xyshift} + {aspatial} + {panel} + {find} + {coltypes} + {header} + {incols} + {perspective} + {transparency} *transparency* can also be a 1d array to set varying transparency for texts, but this option is only valid if using x/y/text. - {w} + {wrap} """ # pylint: disable=too-many-branches kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/triangulate.py b/pygmt/src/triangulate.py index 3b540080033..b36536c3ce6 100644 --- a/pygmt/src/triangulate.py +++ b/pygmt/src/triangulate.py @@ -86,9 +86,9 @@ def _triangulate( Pass in (x, y, z) or (longitude, latitude, elevation) values by providing a file name to an ASCII data table, a 2D {table-classes}. - {J} - {R} - {I} + {projection} + {region} + {spacing} outgrid : bool or str The name of the output netCDF file with extension .nc to store the grid in. The interpolation is performed in the original @@ -102,17 +102,17 @@ def _triangulate( output_type: str Determines the output type. Use "file", "xarray", "pandas", or "numpy". - {V} - {b} - {d} - {e} - {f} - {h} - {i} - {r} + {verbose} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} Only valid with ``outgrid``. - {s} - {w} + {skiprows} + {wrap} Returns ------- @@ -202,9 +202,9 @@ def regular_grid( # pylint: disable=too-many-arguments,too-many-locals Pass in (x, y[, z]) or (longitude, latitude[, elevation]) values by providing a file name to an ASCII data table, a 2D {table-classes}. - {J} - {R} - {I} + {projection} + {region} + {spacing} outgrid : str or None The name of the output netCDF file with extension .nc to store the grid in. The interpolation is performed in the original @@ -212,16 +212,16 @@ def regular_grid( # pylint: disable=too-many-arguments,too-many-locals better off projecting all data to a local coordinate system before using ``triangulate`` (this is true of all gridding routines) or instead select :gmt-docs:`sphtriangulate `. - {V} - {b} - {d} - {e} - {f} - {h} - {i} - {r} - {s} - {w} + {verbose} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} + {skiprows} + {wrap} Returns ------- @@ -319,8 +319,8 @@ def delaunay_triples( # pylint: disable=too-many-arguments,too-many-locals Pass in (x, y, z) or (longitude, latitude, elevation) values by providing a file name to an ASCII data table, a 2D {table-classes}. - {J} - {R} + {projection} + {region} outfile : str or bool or None The name of the output ASCII file to store the results of the histogram equalization in. @@ -331,15 +331,15 @@ def delaunay_triples( # pylint: disable=too-many-arguments,too-many-locals - ``numpy`` - :class:`numpy.ndarray` - ``pandas``- :class:`pandas.DataFrame` - ``file`` - ASCII file (requires ``outfile``) - {V} - {b} - {d} - {e} - {f} - {h} - {i} - {s} - {w} + {verbose} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {skiprows} + {wrap} Returns ------- diff --git a/pygmt/src/velo.py b/pygmt/src/velo.py index f3366e975b2..c396c327bf2 100644 --- a/pygmt/src/velo.py +++ b/pygmt/src/velo.py @@ -154,15 +154,15 @@ def velo(self, data=None, **kwargs): with extension taken positive. - **5**: azimuth of eps2 in degrees CW from North. - {J} - {R} + {projection} + {region} vector : bool or str Modify vector parameters. For vector heads, append vector head *size* [Default is 9p]. See :gmt-docs:`supplements/geodesy/velo.html#vector-attributes` for specifying additional attributes. - {B} - {CPT} + {frame} + {cmap} rescale : str can be used to rescale the uncertainties of velocities (``spec="e"`` and ``spec="r"``) and rotations (``spec="w"``). Can be combined with @@ -208,8 +208,8 @@ def velo(self, data=None, **kwargs): no_clip: bool or str Do NOT skip symbols that fall outside the frame boundary specified by ``region``. [Default plots symbols inside frame only]. - {U} - {V} + {timestamp} + {verbose} pen : str [*pen*][**+c**\ [**f**\|\ **l**]]. Set pen attributes for velocity arrows, ellipse circumference and fault @@ -218,7 +218,7 @@ def velo(self, data=None, **kwargs): updated from the CPT (see ``cmap``). If instead modifier **+cf** is appended then the color from the cpt file is applied to symbol fill only [Default]. Use just **+c** to set both pen and fill color. - {XY} + {xyshift} zvalue : str [**m**\|\ **e**\|\ **n**\|\ **u**\ ][**+e**]. Select the quantity that will be used with the CPT given via ``cmap`` @@ -228,13 +228,13 @@ def velo(self, data=None, **kwargs): required columns). To instead use the corresponding error estimates (i.e., vector or rotation uncertainty) to lookup the color and paint the error ellipse or wedge instead, append **+e**. - {c} - {d} - {e} - {h} - {i} - {p} - {t} + {panel} + {nodata} + {find} + {header} + {incols} + {perspective} + {transparency} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/which.py b/pygmt/src/which.py index 1c831a25379..c8f66c9caa0 100644 --- a/pygmt/src/which.py +++ b/pygmt/src/which.py @@ -48,7 +48,7 @@ def which(fname, **kwargs): places downloaded files), **c** to place it in the user cache directory, or **u** for the user data directory instead (i.e., ignoring any subdirectory structure). - {V} + {verbose} Returns ------- diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index fc609fc048e..9f2b9904018 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -54,14 +54,14 @@ def wiggle(self, data=None, x=None, y=None, z=None, **kwargs): {table-classes}. Use parameter ``incols`` to choose which columns are x, y, z, respectively. - {J} - {R} + {projection} + {region} scale : str or float Gives anomaly scale in data-units/distance-unit. Append **c**, **i**, or **p** to indicate the distance unit (cm, inch, or point); if no unit is given we use the default unit that is controlled by :gmt-term:`PROJ_LENGTH_UNIT`. - {B} + {frame} position : str [**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\ **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\|\ **r**]\ @@ -78,22 +78,22 @@ def wiggle(self, data=None, x=None, y=None, z=None, **kwargs): track : str Draw track [Default is no track]. Append pen attributes to use [Default is ``"0.25p,black,solid"``]. - {U} - {V} + {timestamp} + {verbose} pen : str Specify outline pen attributes [Default is no outline]. - {XY} - {b} - {c} - {d} - {e} - {f} - {g} - {h} - {i} - {p} - {t} - {w} + {xyshift} + {binary} + {panel} + {nodata} + {find} + {coltypes} + {gap} + {header} + {incols} + {perspective} + {transparency} + {wrap} """ kwargs = self._preprocess(**kwargs) # pylint: disable=protected-access diff --git a/pygmt/src/x2sys_cross.py b/pygmt/src/x2sys_cross.py index ed4d044bc89..6423be0dbfa 100644 --- a/pygmt/src/x2sys_cross.py +++ b/pygmt/src/x2sys_cross.py @@ -153,7 +153,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs): Use **e** for external COEs only, and **i** for internal COEs only [Default is all COEs]. - {R} + {region} speed : str or list **l**\|\ **u**\|\ **h**\ *speed*. @@ -170,7 +170,7 @@ def x2sys_cross(tracks=None, outfile=None, **kwargs): speed of 0, upper speed of 10, and disable heading calculations for speeds below 5. - {V} + {verbose} numpoints : int Give the maximum number of data points on either side of the crossover diff --git a/pygmt/src/x2sys_init.py b/pygmt/src/x2sys_init.py index 8c461f097ff..218f02a6306 100644 --- a/pygmt/src/x2sys_init.py +++ b/pygmt/src/x2sys_init.py @@ -95,8 +95,8 @@ def x2sys_init(tag, **kwargs): [Default is ``units=["dk", "se"]`` (km and m/s) if ``discontinuity`` is set, and ``units=["dc", "sc"]`` otherwise (e.g., for Cartesian units)]. - {R} - {V} + {region} + {verbose} gap : str or list **t**\|\ **d**\ *gap*. @@ -107,7 +107,7 @@ def x2sys_init(tag, **kwargs): If these limits are exceeded then a data gap is assumed and no COE will be determined. - {j} + {distcalc} """ with Session() as lib: lib.call_module(module="x2sys_init", args=build_arg_string(kwargs, infile=tag)) diff --git a/pygmt/src/xyz2grd.py b/pygmt/src/xyz2grd.py index e78f0aaddc7..7d64811885b 100644 --- a/pygmt/src/xyz2grd.py +++ b/pygmt/src/xyz2grd.py @@ -73,10 +73,10 @@ def xyz2grd(data=None, x=None, y=None, z=None, **kwargs): assigned to each node (this only requires two input columns *x* and *y* as *z* is not consulted). Append **z** to sum multiple values that belong to the same node. - {I} - {J} - {R} - {V} + {spacing} + {projection} + {region} + {verbose} convention : str [*flags*]. Read a 1-column ASCII [or binary] table. This assumes that all the @@ -117,14 +117,14 @@ def xyz2grd(data=None, x=None, y=None, z=None, **kwargs): each input record to have a single value, while the former can handle multiple values per record but can only parse regular floating point values. Translate incoming *z*-values via the ``incols`` parameter. - {b} - {d} - {e} - {f} - {h} - {i} - {r} - {w} + {binary} + {nodata} + {find} + {coltypes} + {header} + {incols} + {registration} + {wrap} Returns -------