22image - Plot an image.
33"""
44
5+ from pygmt .alias import Alias , AliasSystem
56from pygmt .clib import Session
6- from pygmt .helpers import build_arg_list , fmt_docstring , kwargs_to_strings , use_alias
7+ from pygmt .helpers import build_arg_list , fmt_docstring
78
89
910@fmt_docstring
10- @use_alias (
11- D = "position" ,
12- F = "box" ,
13- G = "bitcolor" ,
14- J = "projection" ,
15- M = "monochrome" ,
16- R = "region" ,
17- V = "verbose" ,
18- c = "panel" ,
19- p = "perspective" ,
20- t = "transparency" ,
21- )
22- @kwargs_to_strings (R = "sequence" , c = "sequence_comma" , p = "sequence" )
2311def image (self , imagefile , ** kwargs ):
2412 r"""
2513 Place images or EPS files on maps.
@@ -29,8 +17,6 @@ def image(self, imagefile, **kwargs):
2917
3018 Full option list at :gmt-docs:`image.html`
3119
32- {aliases}
33-
3420 Parameters
3521 ----------
3622 imagefile : str
@@ -67,6 +53,21 @@ def image(self, imagefile, **kwargs):
6753 {perspective}
6854 {transparency}
6955 """
56+ alias = AliasSystem (
57+ R = Alias ("region" , separator = "/" ),
58+ J = "projection" ,
59+ D = "position" ,
60+ F = "box" ,
61+ G = "bitcolor" ,
62+ M = "monochrome" ,
63+ V = "verbose" ,
64+ c = Alias ("panel" , separator = "," ),
65+ p = Alias ("perspective" , separator = "/" ),
66+ t = "transparency" ,
67+ )
68+
7069 kwargs = self ._preprocess (** kwargs )
7170 with Session () as lib :
72- lib .call_module (module = "image" , args = build_arg_list (kwargs , infile = imagefile ))
71+ lib .call_module (
72+ module = "image" , args = build_arg_list (alias .kwdict , infile = imagefile )
73+ )
0 commit comments