diff --git a/pygmt/src/basemap.py b/pygmt/src/basemap.py index 4bc72c1ad8b..b795ccfce06 100644 --- a/pygmt/src/basemap.py +++ b/pygmt/src/basemap.py @@ -15,19 +15,19 @@ def basemap( # noqa: PLR0913 self, projection: str | None = None, - zsize: float | str | None = None, zscale: float | str | None = None, - frame: str | Sequence[str] | bool = False, + zsize: float | str | None = None, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, + verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] + | bool = False, map_scale: str | None = None, compass: str | None = None, rose: str | None = None, box: str | bool = False, - verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] - | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): """ @@ -70,12 +70,12 @@ def basemap( # noqa: PLR0913 Parameters ---------- $projection - zscale - zsize - Set z-axis scaling or z-axis size. $region *Required if this is the first plot command.* $frame + zscale + zsize + Set z-axis scaling or z-axis size. map_scale Draw a map scale bar on the plot. diff --git a/pygmt/src/binstats.py b/pygmt/src/binstats.py index ad3d03d639b..56ef3a30fca 100644 --- a/pygmt/src/binstats.py +++ b/pygmt/src/binstats.py @@ -47,10 +47,10 @@ def binstats( ] = "number", quantile_value: float = 50, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, incols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> xr.DataArray | None: r""" diff --git a/pygmt/src/blockm.py b/pygmt/src/blockm.py index e4c5cadbba7..b4413286286 100644 --- a/pygmt/src/blockm.py +++ b/pygmt/src/blockm.py @@ -90,11 +90,11 @@ def blockmean( # noqa: PLR0913 outfile: PathLike | None = None, spacing: Sequence[float | str] | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, incols: int | str | Sequence[int | str] | None = None, outcols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> pd.DataFrame | np.ndarray | None: r""" @@ -144,9 +144,9 @@ def blockmean( # noqa: PLR0913 $binary $nodata $find - $incols $coltypes $header + $incols $outcols $registration $wrap @@ -205,11 +205,11 @@ def blockmedian( # noqa: PLR0913 outfile: PathLike | None = None, spacing: Sequence[float | str] | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, incols: int | str | Sequence[int | str] | None = None, outcols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> pd.DataFrame | np.ndarray | None: r""" @@ -320,11 +320,11 @@ def blockmode( # noqa: PLR0913 outfile: PathLike | None = None, spacing: Sequence[float | str] | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, incols: int | str | Sequence[int | str] | None = None, outcols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> pd.DataFrame | np.ndarray | None: r""" diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index e11806474df..31b7d3d7eec 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -29,13 +29,13 @@ def coast( # noqa: PLR0913 map_scale: str | None = None, box: Box | bool = False, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" @@ -74,11 +74,7 @@ def coast( # noqa: PLR0913 Parameters ---------- - $projection - $region - *Required if this is the first plot command.* $area_thresh - $frame lakes : str or list *fill*\ [**+l**\|\ **+r**]. Set the shade, color, or pattern for lakes and river-lakes. The @@ -203,10 +199,14 @@ def coast( # noqa: PLR0913 to any of the continent codes (e.g. ``"=EU"`` for Europe). Append **+p**\ *pen* to draw polygon outlines [Default is no outline] and **+g**\ *fill* to fill them [Default is no fill]. + $projection + $region + *Required if this is the first plot command.* + $frame + $verbose $panel $perspective $transparency - $verbose Example ------- diff --git a/pygmt/src/contour.py b/pygmt/src/contour.py index aa19b3c3584..ae36b4d8c22 100644 --- a/pygmt/src/contour.py +++ b/pygmt/src/contour.py @@ -39,14 +39,14 @@ def contour( # noqa: PLR0913 z=None, no_clip: bool = False, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, - perspective: float | Sequence[float] | str | bool = False, incols: int | str | Sequence[int | str] | None = None, + perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" @@ -78,8 +78,6 @@ def contour( # noqa: PLR0913 $table_classes. x/y/z : 1-D arrays Arrays of x and y coordinates and values z of the data points. - $projection - $region annotation : float, list, or str Specify or disable annotated contour levels, modifies annotated contours specified in ``levels``. @@ -90,7 +88,6 @@ def contour( # noqa: PLR0913 - Adjust the appearance by appending different modifiers, e.g., ``"annot_int+f10p+gred"`` gives annotations with a font size of 10 points and a red filled box. For all available modifiers see :gmt-docs:`contour.html#a`. - $frame levels : float, list, or str Specify the contour lines to generate. @@ -139,6 +136,9 @@ def contour( # noqa: PLR0913 to be of the format [*annotcontlabel*][/*contlabel*]. If either label contains a slash (/) character then use ``|`` as the separator for the two labels instead. + $projection + $region + $frame $verbose $binary $panel diff --git a/pygmt/src/filter1d.py b/pygmt/src/filter1d.py index 92aa8b49cdf..cefa075b29b 100644 --- a/pygmt/src/filter1d.py +++ b/pygmt/src/filter1d.py @@ -100,6 +100,7 @@ def filter1d( Indicate which column contains the independent variable (time). The left-most column is 0, while the right-most is (*n_cols* - 1) [Default is ``0``]. + $verbose Returns ------- diff --git a/pygmt/src/grd2cpt.py b/pygmt/src/grd2cpt.py index a09fb91c8f8..d175d24ea79 100644 --- a/pygmt/src/grd2cpt.py +++ b/pygmt/src/grd2cpt.py @@ -182,6 +182,7 @@ def grd2cpt( Produce a wrapped (cyclic) color table that endlessly repeats its range. Note that ``cyclic=True`` cannot be set together with ``categorical=True``. + $region $verbose Example diff --git a/pygmt/src/grd2xyz.py b/pygmt/src/grd2xyz.py index fe8b98d8060..cc67aaf6394 100644 --- a/pygmt/src/grd2xyz.py +++ b/pygmt/src/grd2xyz.py @@ -68,10 +68,6 @@ def grd2xyz( **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. - $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. weight : str [**a**\ [**+u**\ *unit*]\|\ *weight*]. Write out *x,y,z,w*\ , where *w* is the supplied *weight* (or 1 if not @@ -83,7 +79,6 @@ def grd2xyz( 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. - $verbose convention : str [*flags*]. Write a 1-column ASCII [or binary] table. Output will be organized @@ -114,6 +109,11 @@ def grd2xyz( - **d**: 8-byte floating point double precision Default format is scanline orientation of ASCII numbers: **TLa**. + $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. + $verbose $binary $nodata $coltypes diff --git a/pygmt/src/grdclip.py b/pygmt/src/grdclip.py index 16038a0c9e6..2dc422ea337 100644 --- a/pygmt/src/grdclip.py +++ b/pygmt/src/grdclip.py @@ -62,7 +62,6 @@ def grdclip( ---------- $grid $outgrid - $region above Pass a sequence of two values in the form of (*high*, *above*), to set all node values greater than *high* to *above*. @@ -80,6 +79,7 @@ def grdclip( (e.g., list of lists or 2-D numpy array) to replace different old values with different new values. This is mostly useful when your data are known to be integer values. + $region $verbose Returns diff --git a/pygmt/src/grdcontour.py b/pygmt/src/grdcontour.py index fada25fddc4..0e06f31be81 100644 --- a/pygmt/src/grdcontour.py +++ b/pygmt/src/grdcontour.py @@ -39,13 +39,13 @@ def grdcontour( self, grid: PathLike | xr.DataArray, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" @@ -94,16 +94,12 @@ def grdcontour( Do not draw contours with less than `cut` number of points. resample : str or int Resample smoothing factor. - $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. - $verbose pen : str or list [*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]]. *type*, if present, can be **a** for annotated contours or **c** for regular @@ -114,8 +110,6 @@ def grdcontour( contour lines are taken from the CPT (see ``levels``). If **+cf** is appended the colors from the CPT file are applied to the contour annotations. Select **+c** for both effects. - $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 @@ -123,6 +117,12 @@ def grdcontour( to be of the format [*annotcontlabel*][/*contlabel*]. If either label contains a slash (/) character then use ``|`` as the separator for the two labels instead. + $projection + $region + $frame + $verbose + $panel + $coltypes $perspective $transparency diff --git a/pygmt/src/grdcut.py b/pygmt/src/grdcut.py index 5f300dde11d..a8ed5ea6eb0 100644 --- a/pygmt/src/grdcut.py +++ b/pygmt/src/grdcut.py @@ -61,8 +61,6 @@ def grdcut( or an image, so we need to specify the raster kind explicitly. The default is ``"grid"``. $outgrid - $projection - $region extend : bool or float Allow grid to be extended if new ``region`` exceeds existing boundaries. Give a value to initialize nodes outside current region. @@ -87,7 +85,8 @@ def grdcut( NaNs, append **+N** to strip off such columns before (optionally) considering the range of the core subset for further reduction of the area. - + $projection + $region $verbose $coltypes diff --git a/pygmt/src/grdfill.py b/pygmt/src/grdfill.py index adaa50c17ca..aa76838490f 100644 --- a/pygmt/src/grdfill.py +++ b/pygmt/src/grdfill.py @@ -131,8 +131,8 @@ def grdfill( is ignored. $region - $coltypes $verbose + $coltypes Returns ------- diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index c8e7f262557..8fce5bff0ec 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -31,13 +31,13 @@ def grdimage( # noqa: PLR0913 monochrome: bool = False, no_clip: bool = False, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, cores: int | bool = False, **kwargs, ): @@ -89,7 +89,6 @@ def grdimage( # noqa: PLR0913 Parameters ---------- $grid - $frame $cmap img_in : str [**r**]. @@ -132,7 +131,6 @@ def grdimage( # noqa: PLR0913 suitable modifiers [Default is no illumination]. **Note**: If the input data represent an *image* then an *intensfile* or constant *intensity* must be provided. - $projection monochrome Force conversion to monochrome image using the (television) YIQ transformation. Cannot be used with ``nan_transparent``. @@ -146,7 +144,9 @@ def grdimage( # noqa: PLR0913 3). If the input is a grid, use **+z** to select another grid value than NaN. If input is instead an image, append an alternate *color* to select another pixel value to be transparent [Default is ``"black"``]. + $projection $region + $frame $verbose $panel $coltypes diff --git a/pygmt/src/grdinfo.py b/pygmt/src/grdinfo.py index 5f8a5db00fd..bb3f18dc577 100644 --- a/pygmt/src/grdinfo.py +++ b/pygmt/src/grdinfo.py @@ -51,7 +51,6 @@ def grdinfo( Parameters ---------- $grid - $region per_column : str or bool **n**\|\ **t**. Format the report using tab-separated fields on a single line. The @@ -114,6 +113,7 @@ def grdinfo( 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`. + $region $verbose $coltypes diff --git a/pygmt/src/grdlandmask.py b/pygmt/src/grdlandmask.py index 5df4370be7c..0c2dbb21b3e 100644 --- a/pygmt/src/grdlandmask.py +++ b/pygmt/src/grdlandmask.py @@ -64,7 +64,6 @@ def grdlandmask( ---------- $outgrid $spacing - $region $area_thresh resolution Select the resolution of the coastline dataset to use. The available resolutions @@ -98,6 +97,7 @@ def grdlandmask( Values can be any number, or one of ``None``, ``"NaN"``, and ``np.nan`` for setting nodes to NaN. + $region $verbose $registration $cores diff --git a/pygmt/src/grdsample.py b/pygmt/src/grdsample.py index d6f0ceb502a..1c6b348df53 100644 --- a/pygmt/src/grdsample.py +++ b/pygmt/src/grdsample.py @@ -67,12 +67,12 @@ def grdsample( $grid $outgrid $spacing - $region toggle Toggle between grid and pixel registration; if the input is grid-registered, the output will be pixel-registered and vice-versa. This is a *destructive* grid change; see :gmt-docs:`reference/options.html#switch-registrations`. *Note**: ``toggle`` and ``registration`` are mutually exclusive. + $region $verbose $coltypes $interpolation diff --git a/pygmt/src/grdtrack.py b/pygmt/src/grdtrack.py index 570a9b9aa25..1606f37a268 100644 --- a/pygmt/src/grdtrack.py +++ b/pygmt/src/grdtrack.py @@ -197,7 +197,6 @@ def grdtrack( 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*. - $region no_skip : bool Do *not* skip points that fall outside the domain of the grid(s) [Default only output points within the grid domain]. @@ -255,9 +254,10 @@ def grdtrack( 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**. - $verbose z_only : bool Only write out the sampled z-values [Default writes all columns]. + $verbose + $region $aspatial $binary $nodata diff --git a/pygmt/src/grdview.py b/pygmt/src/grdview.py index f9cf5a3a93a..3e37d1015f9 100644 --- a/pygmt/src/grdview.py +++ b/pygmt/src/grdview.py @@ -226,7 +226,8 @@ def grdview( # noqa: PLR0913 function, or just give **+d** to select the default arguments [Default is ``"+a-45+nt1+m0"``]. $projection - zscale/zsize + zscale + zsize Set z-axis scaling or z-axis size. region : str or list *xmin/xmax/ymin/ymax*\ [**+r**][**+u**\ *unit*]. diff --git a/pygmt/src/histogram.py b/pygmt/src/histogram.py index 61660b1f538..c2e55ed7218 100644 --- a/pygmt/src/histogram.py +++ b/pygmt/src/histogram.py @@ -45,17 +45,17 @@ def histogram( # noqa: PLR0913 self, data: PathLike | TableLike, - projection: str | None = None, bar_width: float | str | None = None, bar_offset: float | str | None = None, - frame: str | Sequence[str] | bool = False, + projection: str | None = None, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, - perspective: float | Sequence[float] | str | bool = False, incols: int | str | Sequence[int | str] | None = None, + perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" @@ -79,14 +79,10 @@ def histogram( # noqa: PLR0913 data Pass in either a file name to an ASCII data table, a Python list, a 2-D $table_classes. - $projection - $region - $frame $cmap fill : str Set color or pattern for filling bars [Default is no fill]. $pen - $panel annotate : bool or str [**+b**][**+f**\ *font*][**+o**\ *off*][**+r**]. Annotate each bar with the count it represents. Append any of the @@ -149,8 +145,12 @@ def histogram( # noqa: PLR0913 To use weights provided as a second data column instead of pure counts, append **+w**. + $projection + $region + $frame $verbose $binary + $panel $nodata $find $header diff --git a/pygmt/src/info.py b/pygmt/src/info.py index 2ab4d69a3c6..210419551b5 100644 --- a/pygmt/src/info.py +++ b/pygmt/src/info.py @@ -18,10 +18,10 @@ def info( data: PathLike | TableLike, spacing: Sequence[float] | str | None = None, per_column: bool = False, + incols: int | str | Sequence[int | str] | None = None, registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, - incols: int | str | Sequence[int | str] | None = None, **kwargs, ) -> np.ndarray | str: r""" @@ -68,11 +68,10 @@ def info( **dz**\[\ **+c**\ *col*]. 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]``. - $verbose $aspatial - $incols $coltypes + $incols $registration Returns diff --git a/pygmt/src/makecpt.py b/pygmt/src/makecpt.py index 3e331caffc7..f378421c686 100644 --- a/pygmt/src/makecpt.py +++ b/pygmt/src/makecpt.py @@ -157,7 +157,6 @@ def makecpt( continuous Force a continuous CPT when building from a list of colors and a list of z-values [Default is False, i.e. discrete CPT]. - $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 @@ -167,6 +166,7 @@ def makecpt( Produce a wrapped (cyclic) color table that endlessly repeats its range. Note that ``cyclic=True`` cannot be set together with ``categorical=True``. + $verbose """ if kwargs.get("W") is not None and kwargs.get("Ww") is not None: raise GMTParameterError(at_most_one=["categorical", "cyclic"]) diff --git a/pygmt/src/nearneighbor.py b/pygmt/src/nearneighbor.py index dec482aceec..62b03b9f826 100644 --- a/pygmt/src/nearneighbor.py +++ b/pygmt/src/nearneighbor.py @@ -36,10 +36,10 @@ def nearneighbor( outgrid: PathLike | None = None, spacing: Sequence[float | str] | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, incols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> xr.DataArray | None: r""" @@ -97,8 +97,6 @@ def nearneighbor( $spacing - $region - search_radius : str Set the search radius that determines which data points are considered close to a node. @@ -120,6 +118,7 @@ def nearneighbor( Alternatively, use ``sectors="n"`` to call GDAL's nearest neighbor algorithm instead. + $region $verbose $aspatial $binary diff --git a/pygmt/src/plot.py b/pygmt/src/plot.py index ab7d0599e63..8f8873bde62 100644 --- a/pygmt/src/plot.py +++ b/pygmt/src/plot.py @@ -52,14 +52,14 @@ def plot( # noqa: PLR0912, PLR0913 direction=None, straight_line: bool | Literal["x", "y"] = False, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | Sequence[float] | bool | None = None, - perspective: float | Sequence[float] | str | bool = False, incols: int | str | Sequence[int | str] | None = None, + perspective: float | Sequence[float] | str | bool = False, + transparency: float | Sequence[float] | bool | None = None, **kwargs, ): r""" @@ -116,8 +116,6 @@ def plot( # noqa: PLR0912, PLR0913 should be a list of two 1-D 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. - $projection - $region straight_line By default, line segments are drawn as straight lines in the Cartesian and polar coordinate systems, and as great circle arcs (by resampling coarse input data @@ -141,7 +139,6 @@ def plot( # noqa: PLR0912, PLR0913 meaning of *x* and *y* is reversed, i.e., *x* means meridians and *y* means parallels. The bug is fixed by upstream `PR #8648 `__. - $frame $cmap offset : str *dx*/*dy*. @@ -210,7 +207,6 @@ def plot( # noqa: PLR0912, PLR0913 Plot symbols (including vectors, pie slices, fronts, decorated or quoted lines). $pen - $verbose zvalue : str *value*\|\ *file*. Instead of specifying a symbol or polygon fill and outline color @@ -220,6 +216,10 @@ def plot( # noqa: PLR0912, PLR0913 polygon in the input data. To apply it to the fill color, use ``fill="+z"``. To apply it to the pen color, append **+z** to ``pen``. + $projection + $region + $frame + $verbose $aspatial $binary $panel diff --git a/pygmt/src/plot3d.py b/pygmt/src/plot3d.py index ba100656ba5..c6aa0e93d67 100644 --- a/pygmt/src/plot3d.py +++ b/pygmt/src/plot3d.py @@ -54,14 +54,14 @@ def plot3d( # noqa: PLR0912, PLR0913 projection: str | None = None, zscale: float | str | None = None, zsize: float | str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | Sequence[float] | bool | None = None, - perspective: float | Sequence[float] | str | bool = False, incols: int | str | Sequence[int | str] | None = None, + perspective: float | Sequence[float] | str | bool = False, + transparency: float | Sequence[float] | bool | None = None, **kwargs, ): r""" @@ -119,10 +119,6 @@ def plot3d( # noqa: PLR0912, PLR0913 should be a list of two 1-D 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. - $projection - zscale/zsize - Set z-axis scaling or z-axis size. - $region straight_line By default, line segments are drawn as straight lines in the Cartesian and polar coordinate systems, and as great circle arcs (by resampling coarse input data @@ -148,7 +144,6 @@ def plot3d( # noqa: PLR0912, PLR0913 meaning of *x* and *y* is reversed, i.e., *x* means meridians and *y* means parallels. The bug is fixed by upstream `PR #8648 `__. - $frame $cmap offset : str *dx*/*dy*\ [/*dz*]. @@ -189,7 +184,6 @@ def plot3d( # noqa: PLR0912, PLR0913 the foreground are plotted after items in the background. style : str Plot symbols. Full documentation is at :gmt-docs:`plot3d.html#s`. - $verbose $pen zvalue : str *value*\|\ *file*. @@ -200,6 +194,13 @@ def plot3d( # noqa: PLR0912, PLR0913 polygon in the input data. To apply it to the fill color, use ``fill="+z"``. To apply it to the pen color, append **+z** to ``pen``. + $projection + zscale + zsize + Set z-axis scaling or z-axis size. + $region + $frame + $verbose $aspatial $binary $panel diff --git a/pygmt/src/rose.py b/pygmt/src/rose.py index 14edc5183a0..ef819c0685a 100644 --- a/pygmt/src/rose.py +++ b/pygmt/src/rose.py @@ -39,14 +39,14 @@ def rose( # noqa: PLR0913 data: PathLike | TableLike | None = None, length=None, azimuth=None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, - perspective: float | Sequence[float] | str | bool = False, incols: int | str | Sequence[int | str] | None = None, + perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): """ diff --git a/pygmt/src/select.py b/pygmt/src/select.py index dd60eca2c7e..a266fc62163 100644 --- a/pygmt/src/select.py +++ b/pygmt/src/select.py @@ -150,7 +150,6 @@ def select( (and ``area_thresh``, ``resolution``). - **z** select records NOT within the range specified by ``z_subregion``. - $projection mask_values : str or list Pass all records whose location is inside specified geographical features. Specify if records should be skipped (s) or kept (k) using 1 of 2 formats: @@ -168,8 +167,6 @@ def select( the coastlines differ in details, a node in a mask file using one resolution is not guaranteed to remain inside [or outside] when a different resolution is selected. If ``None``, the low resolution is used by default. - $region - $verbose z_subregion : str or list *min*\ [/*max*]\ [**+a**]\ [**+c**\ *col*]\ [**+i**]. Pass all records whose 3rd column (*z*; *col* = 2) lies within the @@ -189,6 +186,9 @@ def select( 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`` argument, starting with 2. + $projection + $region + $verbose $binary $nodata $find diff --git a/pygmt/src/solar.py b/pygmt/src/solar.py index 7669153e66f..4a4ab0dc688 100644 --- a/pygmt/src/solar.py +++ b/pygmt/src/solar.py @@ -22,13 +22,13 @@ def solar( # noqa: PLR0913 fill: str | None = None, pen: str | None = None, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" @@ -74,13 +74,13 @@ def solar( # noqa: PLR0913 integer number of hours (e.g., -8 or +5); fractional hours are truncated towards zero (e.g., -8.5 becomes -8 and +5.5 becomes +5). [Default is the current UTC date and time]. - $region - $projection - $frame fill Set color or pattern for filling terminators [Default is no fill]. pen Set pen attributes for lines [Default is ``"0.25p,black,solid"``]. + $projection + $region + $frame $verbose $panel $perspective diff --git a/pygmt/src/sph2grd.py b/pygmt/src/sph2grd.py index ba25a1ced7c..1c32d422a61 100644 --- a/pygmt/src/sph2grd.py +++ b/pygmt/src/sph2grd.py @@ -21,10 +21,10 @@ def sph2grd( outgrid: PathLike | None = None, spacing: Sequence[float | str] | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, incols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, cores: int | bool = False, **kwargs, ) -> xr.DataArray | None: diff --git a/pygmt/src/sphdistance.py b/pygmt/src/sphdistance.py index 5c8c0df5a4f..74d1e72ae89 100644 --- a/pygmt/src/sphdistance.py +++ b/pygmt/src/sphdistance.py @@ -62,8 +62,6 @@ def sphdistance( Arrays of x and y coordinates. $outgrid $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 @@ -99,6 +97,8 @@ def sphdistance( voronoi : str Append the name of a file with pre-calculated Voronoi polygons [Default performs the Voronoi construction on input data]. + $region + $verbose Returns ------- diff --git a/pygmt/src/surface.py b/pygmt/src/surface.py index 8a6accc0355..0fc0daaa71b 100644 --- a/pygmt/src/surface.py +++ b/pygmt/src/surface.py @@ -40,9 +40,9 @@ def surface( outgrid: PathLike | None = None, spacing: Sequence[float | str] | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> xr.DataArray | None: r""" @@ -92,10 +92,7 @@ def surface( $table_classes. x/y/z : 1-D arrays Arrays of x and y coordinates and values z of the data points. - $spacing - - $region $outgrid convergence : float Optional. Convergence limit. Iteration is assumed to have converged @@ -141,6 +138,7 @@ def surface( set boundary tension. If you do not prepend **i** or **b**, both will be set to the same value. [Default is 0 for both and gives minimum curvature solution.] + $region $verbose $aspatial $binary diff --git a/pygmt/src/ternary.py b/pygmt/src/ternary.py index 9f2adc41051..127ae54d3a3 100644 --- a/pygmt/src/ternary.py +++ b/pygmt/src/ternary.py @@ -19,13 +19,13 @@ def ternary( # noqa: PLR0913 alabel: str | None = None, blabel: str | None = None, clabel: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" diff --git a/pygmt/src/text.py b/pygmt/src/text.py index 5f1f1bbef94..a82afb4e3c0 100644 --- a/pygmt/src/text.py +++ b/pygmt/src/text.py @@ -46,13 +46,13 @@ def text_( # noqa: PLR0912, PLR0913 justify: bool | None | AnchorCode | Sequence[AnchorCode] = None, no_clip: bool = False, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | Sequence[float] | bool | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | Sequence[float] | bool | None = None, **kwargs, ): r""" @@ -133,9 +133,6 @@ def text_( # noqa: PLR0912, PLR0913 e.g., **BL** for Bottom Left. If no justification is explicitly given (i.e. ``justify=True``), then the input to ``textfiles`` must have this as a column. - $projection - $region - *Required if this is the first plot command.* clearance : str [*dx/dy*][**+to**\|\ **O**\|\ **c**\|\ **C**]. Adjust the clearance between the text and the surrounding box @@ -167,6 +164,9 @@ def text_( # noqa: PLR0912, PLR0913 (see ``clearance``) [Default is ``"0.25p,black,solid"``]. no_clip Do **not** clip text at the frame boundaries [Default is ``False``]. + $projection + $region + *Required if this is the first plot command.* $verbose $aspatial $panel diff --git a/pygmt/src/tilemap.py b/pygmt/src/tilemap.py index deef5ca3188..66f7a7216bb 100644 --- a/pygmt/src/tilemap.py +++ b/pygmt/src/tilemap.py @@ -35,8 +35,8 @@ def tilemap( # noqa: PLR0913 verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" diff --git a/pygmt/src/triangulate.py b/pygmt/src/triangulate.py index bf0112f63cd..e41010adf5e 100644 --- a/pygmt/src/triangulate.py +++ b/pygmt/src/triangulate.py @@ -68,12 +68,12 @@ def regular_grid( # noqa: PLR0913 spacing: Sequence[float | str] | None = None, projection: str | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal[ "quiet", "error", "warning", "timing", "info", "compat", "debug" ] | bool = False, incols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> xr.DataArray | None: """ @@ -116,8 +116,6 @@ def regular_grid( # noqa: PLR0913 Pass in (x, y[, z]) or (longitude, latitude[, elevation]) values by providing a file name to an ASCII data table, a 2-D $table_classes. - $projection - $region $spacing $outgrid The interpolation is performed in the original coordinates, so if @@ -125,6 +123,8 @@ def regular_grid( # noqa: PLR0913 all data to a local coordinate system before using ``triangulate`` (this is true of all gridding routines) or instead select :gmt-docs:`sphtriangulate `. + $projection + $region $verbose $binary $nodata @@ -197,12 +197,12 @@ def delaunay_triples( # noqa: PLR0913 spacing: Sequence[float | str] | None = None, projection: str | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal[ "quiet", "error", "warning", "timing", "info", "compat", "debug" ] | bool = False, incols: int | str | Sequence[int | str] | None = None, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> pd.DataFrame | np.ndarray | None: """ @@ -237,10 +237,10 @@ def delaunay_triples( # noqa: PLR0913 Pass in (x, y, z) or (longitude, latitude, elevation) values by providing a file name to an ASCII data table, a 2-D $table_classes. - $projection - $region $output_type $outfile + $projection + $region $verbose $binary $nodata diff --git a/pygmt/src/velo.py b/pygmt/src/velo.py index dbdd37a8c26..346d7e1295e 100644 --- a/pygmt/src/velo.py +++ b/pygmt/src/velo.py @@ -40,14 +40,14 @@ def velo( # noqa : PLR0913 data: PathLike | TableLike | None = None, no_clip: bool = False, projection: str | None = None, - frame: str | Sequence[str] | bool = False, region: Sequence[float | str] | str | None = None, + frame: str | Sequence[str] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, - transparency: float | None = None, - perspective: float | Sequence[float] | str | bool = False, incols: int | str | Sequence[int | str] | None = None, + perspective: float | Sequence[float] | str | bool = False, + transparency: float | None = None, **kwargs, ): r""" @@ -174,14 +174,11 @@ def velo( # noqa : PLR0913 with extension taken positive. - **5**: azimuth of eps2 in degrees CW from North. - $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. - $frame $cmap rescale : str Can be used to rescale the uncertainties of velocities (``spec="e"`` @@ -228,7 +225,6 @@ def velo( # noqa : PLR0913 no_clip Do **not** skip symbols that fall outside the frame boundaries [Default is ``False``, i.e., plot symbols inside the frame boundaries only]. - $verbose pen : str [*pen*][**+c**\ [**f**\|\ **l**]]. Set pen attributes for velocity arrows, ellipse circumference and fault @@ -246,6 +242,10 @@ def velo( # noqa : PLR0913 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**. + $projection + $region + $frame + $verbose $panel $nodata $find diff --git a/pygmt/src/wiggle.py b/pygmt/src/wiggle.py index 2f3989bc494..603d5339f73 100644 --- a/pygmt/src/wiggle.py +++ b/pygmt/src/wiggle.py @@ -42,7 +42,6 @@ def wiggle( # noqa: PLR0913 z=None, position: Position | Sequence[float | str] | AnchorCode | None = None, length: float | str | None = None, - label: str | None = None, label_alignment: Literal["left", "right"] | None = None, positive_fill: str | None = None, negative_fill: str | None = None, @@ -52,9 +51,10 @@ def wiggle( # noqa: PLR0913 verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, panel: int | Sequence[int] | bool = False, + incols: int | str | Sequence[int | str] | None = None, + label: str | None = None, perspective: float | Sequence[float] | str | bool = False, transparency: float | None = None, - incols: int | str | Sequence[int | str] | None = None, **kwargs, ): r""" diff --git a/pygmt/src/x2sys_cross.py b/pygmt/src/x2sys_cross.py index 22d2c720640..c0ca51c38b0 100644 --- a/pygmt/src/x2sys_cross.py +++ b/pygmt/src/x2sys_cross.py @@ -162,8 +162,6 @@ def x2sys_cross( Use **e** for external COEs only, and **i** for internal COEs only [Default is all COEs]. - $region - speed : str or list **l**\|\ **u**\|\ **h**\ *speed*. Defines window of track speeds. If speeds are outside this window we do @@ -179,8 +177,6 @@ def x2sys_cross( speed of 0, upper speed of 10, and disable heading calculations for speeds below 5. - $verbose - numpoints : int Give the maximum number of data points on either side of the crossover to use in the spline interpolation [Default is 3]. @@ -188,6 +184,8 @@ def x2sys_cross( track_values : bool Report the values of each track at the crossover [Default reports the crossover value and the mean value]. + $region + $verbose Returns ------- diff --git a/pygmt/src/x2sys_init.py b/pygmt/src/x2sys_init.py index a7ff867fa55..1abba77d350 100644 --- a/pygmt/src/x2sys_init.py +++ b/pygmt/src/x2sys_init.py @@ -106,9 +106,6 @@ def x2sys_init( [Default is ``units=["dk", "se"]`` (km and m/s) if ``discontinuity`` is set, and ``units=["dc", "sc"]`` otherwise (e.g., for Cartesian units)]. - $region - $verbose - gap : str or list **t**\|\ **d**\ *gap*. Give **t** or **d** and append the corresponding maximum time gap (in @@ -118,6 +115,8 @@ def x2sys_init( If these limits are exceeded then a data gap is assumed and no COE will be determined. + $region + $verbose $distcalc """ aliasdict = AliasSystem( diff --git a/pygmt/src/xyz2grd.py b/pygmt/src/xyz2grd.py index 7a477401a18..fbd0b727ba6 100644 --- a/pygmt/src/xyz2grd.py +++ b/pygmt/src/xyz2grd.py @@ -36,9 +36,9 @@ def xyz2grd( spacing: Sequence[float | str] | None = None, projection: str | None = None, region: Sequence[float | str] | str | None = None, - registration: Literal["gridline", "pixel"] | bool = False, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] | bool = False, + registration: Literal["gridline", "pixel"] | bool = False, **kwargs, ) -> xr.DataArray | None: r""" @@ -84,9 +84,6 @@ def xyz2grd( *x* and *y* as *z* is not consulted). Append **z** to sum multiple values that belong to the same node. $spacing - $projection - $region - $verbose convention : str [*flags*]. Read a 1-column ASCII [or binary] table. This assumes that all the @@ -127,6 +124,9 @@ def xyz2grd( 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. + $projection + $region + $verbose $binary $nodata $find