55import warnings
66from typing import Literal
77
8- from pygmt .alias import AliasSystem
8+ from pygmt .alias import Alias , AliasSystem
99from pygmt .clib import Session
1010from pygmt .helpers import build_arg_list , fmt_docstring , kwargs_to_strings , use_alias
1111
1818 B = "frame" ,
1919 L = "map_scale" ,
2020 F = "box" ,
21- Td = "rose" ,
2221 Tm = "compass" ,
2322 f = "coltypes" ,
2423 p = "perspective" ,
2726def basemap (
2827 self ,
2928 projection = None ,
29+ rose : str | None = None ,
3030 verbose : Literal ["quiet" , "error" , "warning" , "timing" , "info" , "compat" , "debug" ]
3131 | bool = False ,
3232 panel : int | tuple [int , int ] | bool = False ,
@@ -48,6 +48,7 @@ def basemap(
4848
4949 {aliases}
5050 - J = projection
51+ - Td = rose
5152 - V = verbose
5253 - c = panel
5354 - t = transparency
@@ -87,7 +88,8 @@ def basemap(
8788
8889 .. deprecated:: v0.17.0
8990
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.
9193 compass : str
9294 Draw a map magnetic rose on the map at the location defined by the
9395 reference and anchor points.
@@ -99,15 +101,17 @@ def basemap(
99101 """
100102 self ._activate_figure ()
101103
102- if kwargs . get ( "Td" ) :
104+ if rose is not None :
103105 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 . "
105107 "Use 'Figure.directional_rose' instead." ,
106108 DeprecationWarning ,
107109 stacklevel = 2 ,
108110 )
109111
110- aliasdict = AliasSystem ().add_common (
112+ aliasdict = AliasSystem (
113+ Td = Alias (rose , name = "rose" ),
114+ ).add_common (
111115 J = projection ,
112116 V = verbose ,
113117 c = panel ,
0 commit comments