Skip to content

Commit 196f51b

Browse files
committed
Figure.image: Add the alias 'invert' for option -I
1 parent 2b96907 commit 196f51b

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

pygmt/src/image.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ def image(
1919
imagefile: PathLike,
2020
projection=None,
2121
box: Box | bool = False,
22+
invert: bool = False,
2223
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
2324
| bool = False,
2425
panel: int | tuple[int, int] | bool = False,
@@ -35,6 +36,7 @@ def image(
3536
3637
{aliases}
3738
- F = box
39+
- I = invert
3840
- J = projection
3941
- V = verbose
4042
- c = panel
@@ -68,6 +70,9 @@ def image(
6870
to make those pixels transparent. Can be repeated with different
6971
settings. Alternatively, for color images you can select a single
7072
*color* that should be made transparent instead (**+t**).
73+
invert
74+
Invert 1-bit image before plotting, i.e., black pixels (on) becomes white (off)
75+
and vice versa. Ignored if used with color images.
7176
monochrome : bool
7277
Convert color image to monochrome grayshades using the (television)
7378
YIQ-transformation.
@@ -80,6 +85,7 @@ def image(
8085

8186
aliasdict = AliasSystem(
8287
F=Alias(box, name="box"),
88+
I=Alias(invert, name="invert"),
8389
).add_common(
8490
J=projection,
8591
V=verbose,

0 commit comments

Comments
 (0)