5
5
import warnings
6
6
from typing import Literal
7
7
8
- from pygmt .alias import AliasSystem
8
+ from pygmt .alias import Alias , AliasSystem
9
9
from pygmt .clib import Session
10
10
from pygmt .helpers import build_arg_list , fmt_docstring , kwargs_to_strings , use_alias
11
11
18
18
B = "frame" ,
19
19
L = "map_scale" ,
20
20
F = "box" ,
21
- Td = "rose" ,
22
21
Tm = "compass" ,
23
22
f = "coltypes" ,
24
23
p = "perspective" ,
27
26
def basemap (
28
27
self ,
29
28
projection = None ,
29
+ rose : str | None = None ,
30
30
verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
31
31
| bool = False ,
32
32
panel : int | tuple [int , int ] | bool = False ,
@@ -48,6 +48,7 @@ def basemap(
48
48
49
49
{aliases}
50
50
- J = projection
51
+ - Td = rose
51
52
- V = verbose
52
53
- c = panel
53
54
- t = transparency
@@ -87,7 +88,8 @@ def basemap(
87
88
88
89
.. deprecated:: v0.17.0
89
90
90
- Use :py:func:`pygmt.Figure.directional_rose` instead.
91
+ Use :py:func:`pygmt.Figure.directional_rose` instead. Will be removed in
92
+ v0.20.0.
91
93
compass : str
92
94
Draw a map magnetic rose on the map at the location defined by the
93
95
reference and anchor points.
@@ -99,15 +101,17 @@ def basemap(
99
101
"""
100
102
self ._activate_figure ()
101
103
102
- if kwargs . get ( "Td" ) :
104
+ if rose is not None :
103
105
warnings .warn (
104
- "Parameter 'rose' is deprecated and will be removed in a future version . "
106
+ "Parameter 'rose' is deprecated in v0.17.0 and will be removed in v0.20.0 . "
105
107
"Use 'Figure.directional_rose' instead." ,
106
108
DeprecationWarning ,
107
109
stacklevel = 2 ,
108
110
)
109
111
110
- aliasdict = AliasSystem ().add_common (
112
+ aliasdict = AliasSystem (
113
+ Td = Alias (rose , name = "rose" ),
114
+ ).add_common (
111
115
J = projection ,
112
116
V = verbose ,
113
117
c = panel ,
0 commit comments