diff --git a/pygmt/src/coast.py b/pygmt/src/coast.py index ae6efb3e0bb..046d03d3ef5 100644 --- a/pygmt/src/coast.py +++ b/pygmt/src/coast.py @@ -24,18 +24,18 @@ A="area_thresh", C="lakes", E="dcw", - G="land", I="rivers", L="map_scale", N="borders", - S="water", W="shorelines", ) -def coast( +def coast( # noqa: PLR0913 self, resolution: Literal[ "auto", "full", "high", "intermediate", "low", "crude", None ] = None, + land: str | None = None, + water: str | None = None, box: Box | bool = False, projection: str | None = None, frame: str | Sequence[str] | bool = False, @@ -70,8 +70,10 @@ def coast( - B = frame - D = resolution - F = box + - G = land - J = projection - R = region + - S = water - V = verbose - c = panel - p = perspective @@ -97,8 +99,10 @@ def coast( ``"low"``, and ``"crude"``, which drops by 80% between levels. Default is ``"auto"`` to automatically select the most suitable resolution given the chosen map scale. - land : str + land Select filling of "dry" areas. + water + Select filling of "wet" areas. rivers : int, str, or list *river*\ [/*pen*]. Draw rivers. Specify the type of rivers and [optionally] append @@ -149,8 +153,6 @@ def coast( - ``3``: marine boundaries - ``"a"``: all boundaries (``1`` - ``3``) - water : str - Select filling "wet" areas. shorelines : bool, int, str, or list [*level*\ /]\ *pen*. Draw shorelines [Default is no shorelines]. Append pen attributes @@ -201,10 +203,15 @@ def coast( >>> fig.show() """ self._activate_figure() - if not args_in_kwargs(args=["C", "G", "S", "I", "N", "E", "Q", "W"], kwargs=kwargs): + + if ( + kwargs.get("G", land) is None + and kwargs.get("S", water) is None + and not args_in_kwargs(args=["C", "I", "N", "E", "Q", "W"], kwargs=kwargs) + ): msg = ( "At least one of the following parameters must be specified: " - "lakes, land, water, rivers, borders, dcw, Q, or shorelines." + "land, water, lakes, rivers, borders, dcw, Q, or shorelines." ) raise GMTInvalidInput(msg) @@ -222,6 +229,8 @@ def coast( }, ), F=Alias(box, name="box"), + G=Alias(land, name="land"), + S=Alias(water, name="water"), ).add_common( B=frame, J=projection,