diff --git a/pygmt/helpers/decorators.py b/pygmt/helpers/decorators.py index 017aeb0710a..3374af11d29 100644 --- a/pygmt/helpers/decorators.py +++ b/pygmt/helpers/decorators.py @@ -17,12 +17,12 @@ COMMON_DOCSTRINGS = { "area_thresh": r""" - area_thresh : float or str + area_thresh *min_area*\ [/*min_level*/*max_level*][**+a**\[**g**\|\ **i**]\ [**s**\|\ **S**]][**+l**\|\ **r**][**+p**\ *percent*]. Features with an area smaller than *min_area* in km\ :sup:`2` or of - hierarchical level that is lower than *min_level* or higher than - *max_level* will not be plotted [Default is ``"0/0/4"`` (all features)].""", + hierarchical level that is lower than *min_level* or higher than *max_level* + will not be plotted [Default is ``"0/0/4"`` (all features)].""", "aspatial": r""" aspatial : bool or str [*col*\ =]\ *name*\ [,...]. diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index cd6123a1665..93e45ebc15a 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -68,7 +68,7 @@ def _alias_option_C(lakes=None, river_lakes=None): # ruff: ignore[invalid-funct @fmt_docstring -@use_alias(A="area_thresh", E="dcw") +@use_alias(E="dcw") def coast( self, resolution: Literal[ @@ -81,6 +81,7 @@ def coast( shorelines: bool | str | Sequence[int | str] = False, lakes: str | None = None, river_lakes: str | None = None, + area_thresh: float | str | None = None, map_scale: str | None = None, box: Box | bool = False, projection: str | None = None, @@ -113,6 +114,7 @@ def coast( Full GMT docs at :gmt-docs:`coast.html`. $aliases + - A = area_thresh - B = frame - C = lakes, river_lakes - D = resolution @@ -320,6 +322,7 @@ def coast( ) aliasdict = AliasSystem( + A=Alias(area_thresh, name="area_thresh"), C=_alias_option_C(lakes=lakes, river_lakes=river_lakes), D=Alias( resolution, diff --git a/pygmt/src/grdlandmask.py b/pygmt/src/grdlandmask.py index 0c8d8b0f81d..a6f66144c48 100644 --- a/pygmt/src/grdlandmask.py +++ b/pygmt/src/grdlandmask.py @@ -10,13 +10,12 @@ from pygmt.alias import Alias, AliasSystem from pygmt.clib import Session from pygmt.exceptions import GMTParameterError -from pygmt.helpers import build_arg_list, fmt_docstring, use_alias +from pygmt.helpers import build_arg_list, fmt_docstring __doctest_skip__ = ["grdlandmask"] @fmt_docstring -@use_alias(A="area_thresh") def grdlandmask( outgrid: PathLike | None = None, spacing: Sequence[float | str] | None = None, @@ -25,6 +24,7 @@ def grdlandmask( resolution: Literal[ "auto", "full", "high", "intermediate", "low", "crude", None ] = None, + area_thresh: 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"] @@ -32,7 +32,7 @@ def grdlandmask( cores: int | bool = False, **kwargs, ) -> xr.DataArray | None: - r""" + """ Create a "wet-dry" mask grid from shoreline database. Read the selected shoreline database and use that information to decide which nodes @@ -43,7 +43,13 @@ def grdlandmask( Full GMT docs at :gmt-docs:`grdlandmask.html`. - $aliases + + **Aliases** + + .. hlist:: + :columns: 3 + + - A = area_thresh - D = resolution - E = border_values - G = outgrid @@ -116,6 +122,7 @@ def grdlandmask( raise GMTParameterError(required=["region", "spacing"]) aliasdict = AliasSystem( + A=Alias(area_thresh, name="area_thresh"), D=Alias( resolution, name="resolution", diff --git a/pygmt/src/select.py b/pygmt/src/select.py index ca3267a2c2e..34894c3182f 100644 --- a/pygmt/src/select.py +++ b/pygmt/src/select.py @@ -23,7 +23,6 @@ @fmt_docstring @use_alias( - A="area_thresh", C="dist2pt", F="polygon", G="mask_grid", @@ -48,6 +47,7 @@ def select( resolution: Literal[ "auto", "full", "high", "intermediate", "low", "crude", None ] = None, + area_thresh: float | str | None = None, projection: str | None = None, region: Sequence[float | str] | str | None = None, verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"] @@ -78,6 +78,7 @@ def select( Full GMT docs at :gmt-docs:`gmtselect.html`. $aliases + - A = area_thresh - D = resolution - J = projection - R = region @@ -221,6 +222,7 @@ def select( column_names = data.columns.to_list() aliasdict = AliasSystem( + A=Alias(area_thresh, name="area_thresh"), D=Alias( resolution, name="resolution",