88from pygmt ._typing import PathLike , TableLike
99from pygmt .alias import Alias , AliasSystem
1010from pygmt .clib import Session
11- from pygmt .helpers import build_arg_list , fmt_docstring , use_alias
11+ from pygmt .helpers import build_arg_list , deprecate_parameter , fmt_docstring , use_alias
1212
1313
14- def _parse_fills (fillpositive , fillnegative ):
14+ def _parse_fills (positive_fill , negative_fill ):
1515 """
16- Parse the fillpositive and fillnegative parameters.
16+ Parse the positive_fill and negative_fill parameters.
1717
1818 >>> _parse_fills("red", "blue")
1919 ['red+p', 'blue+n']
@@ -24,10 +24,10 @@ def _parse_fills(fillpositive, fillnegative):
2424 >>> _parse_fills(None, None)
2525 """
2626 _fills = []
27- if fillpositive is not None :
28- _fills .append (fillpositive + "+p" )
29- if fillnegative is not None :
30- _fills .append (fillnegative + "+n" )
27+ if positive_fill is not None :
28+ _fills .append (positive_fill + "+p" )
29+ if negative_fill is not None :
30+ _fills .append (negative_fill + "+n" )
3131
3232 match len (_fills ):
3333 case 0 :
@@ -39,6 +39,12 @@ def _parse_fills(fillpositive, fillnegative):
3939
4040
4141@fmt_docstring
42+ @deprecate_parameter (
43+ "fillpositive" , "positive_fill" , "v0.18.0" , remove_version = "v0.20.0"
44+ )
45+ @deprecate_parameter (
46+ "fillnegative" , "negative_fill" , "v0.18.0" , remove_version = "v0.20.0"
47+ )
4248@use_alias (
4349 D = "position" ,
4450 T = "track" ,
@@ -58,8 +64,8 @@ def wiggle( # noqa: PLR0913
5864 x = None ,
5965 y = None ,
6066 z = None ,
61- fillpositive = None ,
62- fillnegative = None ,
67+ positive_fill = None ,
68+ negative_fill = None ,
6369 projection : str | None = None ,
6470 region : Sequence [float | str ] | str | None = None ,
6571 frame : str | Sequence [str ] | bool = False ,
@@ -83,7 +89,7 @@ def wiggle( # noqa: PLR0913
8389
8490 $aliases
8591 - B = frame
86- - G = **+p**: fillpositive , **+n**: fillnegative
92+ - G = **+p**: positive_fill , **+n**: negative_fill
8793 - J = projection
8894 - R = region
8995 - V = verbose
@@ -114,9 +120,9 @@ def wiggle( # noqa: PLR0913
114120 **+w**\ *length*\ [**+j**\ *justify*]\ [**+al**\|\ **r**]\
115121 [**+o**\ *dx*\ [/*dy*]][**+l**\ [*label*]].
116122 Define the reference point on the map for the vertical scale bar.
117- fillpositive : str
123+ positive_fill : str
118124 Set color or pattern for filling positive wiggles [Default is no fill].
119- fillnegative : str
125+ negative_fill : str
120126 Set color or pattern for filling negative wiggles [Default is no fill].
121127 track : str
122128 Draw track [Default is no track]. Append pen attributes to use
@@ -138,10 +144,10 @@ def wiggle( # noqa: PLR0913
138144 """
139145 self ._activate_figure ()
140146
141- _fills = _parse_fills (fillpositive , fillnegative )
147+ _fills = _parse_fills (positive_fill , negative_fill )
142148
143149 aliasdict = AliasSystem (
144- G = Alias (_fills , name = "fillpositive/fillnegative " ),
150+ G = Alias (_fills , name = "positive_fill/negative_fill " ),
145151 ).add_common (
146152 B = frame ,
147153 J = projection ,
0 commit comments