From 258f44e77635817d627d868203a7fce39bc5d03b Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 19 Aug 2023 09:53:22 +0200 Subject: [PATCH 1/3] Change 'bit_color' to 'bitcolor' --- pygmt/src/grdimage.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index 6f200237927..0619dce6055 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -14,7 +14,7 @@ C="cmap", D="img_in", E="dpi", - G="bit_color", + G="bitcolor", I="shading", J="projection", M="monochrome", @@ -107,7 +107,7 @@ def grdimage(self, grid, **kwargs): same size (rows and columns) as the input file. Specify **i** to use the PostScript image operator to interpolate the image at the device resolution. - bit_color : str + bitcolor : str *color*\ [**+b**\|\ **f**\]. This parameter only applies when a resulting 1-bit image otherwise would consist of only two colors: black (0) and white (255). If so, From ad9129372556f36d958dcdec5ffed939c13af727 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 19 Aug 2023 10:12:32 +0200 Subject: [PATCH 2/3] Add 'deprecate_parameter' decorator --- pygmt/src/grdimage.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index 0619dce6055..0e154d45c50 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -2,12 +2,19 @@ grdimage - Plot grids or images. """ from pygmt.clib import Session -from pygmt.helpers import build_arg_string, fmt_docstring, kwargs_to_strings, use_alias +from pygmt.helpers import ( + build_arg_string, + fmt_docstring, + deprecate_parameter, + kwargs_to_strings, + use_alias, +) __doctest_skip__ = ["grdimage"] @fmt_docstring +@deprecate_parameter("bit_color", "bitcolor", "v0.10.0", remove_version="v0.12.0") @use_alias( A="img_out", B="frame", From d43e1ef525bae7b5f5cb93215631e6c6a9542a13 Mon Sep 17 00:00:00 2001 From: yvonnefroelich Date: Sat, 19 Aug 2023 10:13:33 +0200 Subject: [PATCH 3/3] Fix alphabetical order --- pygmt/src/grdimage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/grdimage.py b/pygmt/src/grdimage.py index 0e154d45c50..6adf6f70ffa 100644 --- a/pygmt/src/grdimage.py +++ b/pygmt/src/grdimage.py @@ -4,8 +4,8 @@ from pygmt.clib import Session from pygmt.helpers import ( build_arg_string, - fmt_docstring, deprecate_parameter, + fmt_docstring, kwargs_to_strings, use_alias, )