Skip to content

Commit 4149b63

Browse files
Deprecate bitcolor to bit_color
1 parent e8cd1e3 commit 4149b63

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

pygmt/src/grdimage.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,18 @@
99
from pygmt._typing import PathLike
1010
from pygmt.alias import Alias, AliasSystem
1111
from pygmt.clib import Session
12-
from pygmt.helpers import build_arg_list, fmt_docstring, use_alias
12+
from pygmt.helpers import build_arg_list, deprecate_parameter, fmt_docstring, use_alias
1313

1414
__doctest_skip__ = ["grdimage"]
1515

1616

1717
@fmt_docstring
18+
@deprecate_parameter("bitcolor", "bit_color", "v0.18.0", remove_version="v0.20.0")
1819
@use_alias(
1920
C="cmap",
2021
D="img_in",
2122
E="dpi",
22-
G="bitcolor",
23+
G="bit_color",
2324
I="shading",
2425
Q="nan_transparent",
2526
n="interpolation",
@@ -109,7 +110,7 @@ def grdimage( # noqa: PLR0913
109110
same size (rows and columns) as the input file. Specify **i** to
110111
use the PostScript image operator to interpolate the image at the
111112
device resolution.
112-
bitcolor : str
113+
bit_color : str
113114
*color*\ [**+b**\|\ **f**\].
114115
This parameter only applies when a resulting 1-bit image otherwise
115116
would consist of only two colors: black (0) and white (255). If so,

pygmt/src/image.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,13 @@
88
from pygmt._typing import PathLike
99
from pygmt.alias import Alias, AliasSystem
1010
from 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
from pygmt.params import Box
1313

1414

1515
@fmt_docstring
16-
@use_alias(D="position", G="bitcolor")
16+
@deprecate_parameter("bitcolor", "bit_color", "v0.18.0", remove_version="v0.20.0")
17+
@use_alias(D="position", G="bit_color")
1718
def image(
1819
self,
1920
imagefile: PathLike,
@@ -74,7 +75,7 @@ def image(
7475
box is drawn using :gmt-term:`MAP_FRAME_PEN`. To customize the box appearance,
7576
pass a :class:`pygmt.params.Box` object to control style, fill, pen, and other
7677
box properties.
77-
bitcolor : str or list
78+
bit_color : str or list
7879
[*color*][**+b**\|\ **f**\|\ **t**].
7980
Change certain pixel values to another color or make them transparent.
8081
For 1-bit images you can specify an alternate *color* for the

0 commit comments

Comments
 (0)