Skip to content

Commit 043e62d

Browse files
Figure.solar: Migrate the fill/pen parameters to the new alias system (#4109)
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
1 parent 56eff41 commit 043e62d

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

pygmt/src/solar.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,14 @@
1414

1515

1616
@fmt_docstring
17-
@use_alias(
18-
B="frame",
19-
G="fill",
20-
R="region",
21-
W="pen",
22-
p="perspective",
23-
)
17+
@use_alias(B="frame", R="region", p="perspective")
2418
@kwargs_to_strings(R="sequence", p="sequence")
2519
def solar(
2620
self,
2721
terminator: Literal["astronomical", "civil", "day_night", "nautical"] = "day_night",
2822
terminator_datetime=None,
23+
fill: str | None = None,
24+
pen: str | None = None,
2925
projection=None,
3026
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
3127
| bool = False,
@@ -42,9 +38,11 @@ def solar(
4238
Full GMT docs at :gmt-docs:`solar.html`.
4339
4440
{aliases}
41+
- G = fill
4542
- J = projection
4643
- T = terminator, **+d**: terminator_datetime
4744
- V = verbose
45+
- W = pen
4846
- c = panel
4947
- t = transparency
5048
@@ -67,9 +65,9 @@ def solar(
6765
{region}
6866
{projection}
6967
{frame}
70-
fill : str
68+
fill
7169
Set color or pattern for filling terminators [Default is no fill].
72-
pen : str
70+
pen
7371
Set pen attributes for lines [Default is ``"0.25p,black,solid"``].
7472
{verbose}
7573
{panel}
@@ -114,6 +112,7 @@ def solar(
114112
raise GMTValueError(terminator_datetime, description="datetime") from verr
115113

116114
aliasdict = AliasSystem(
115+
G=Alias(fill, name="fill"),
117116
T=[
118117
Alias(
119118
terminator,
@@ -127,6 +126,7 @@ def solar(
127126
),
128127
Alias(datetime_string, name="terminator_datetime", prefix="+d"),
129128
],
129+
W=Alias(pen, name="pen"),
130130
).add_common(
131131
J=projection,
132132
V=verbose,

0 commit comments

Comments
 (0)