Skip to content

Commit a36b8af

Browse files
committed
Add more parameters
1 parent 607f4db commit a36b8af

File tree

3 files changed

+24
-5
lines changed

3 files changed

+24
-5
lines changed

doc/api/index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ Plotting map elements
3737
Figure.timestamp
3838
Figure.vlines
3939

40-
4140
Plotting tabular data
4241
~~~~~~~~~~~~~~~~~~~~~
4342

pygmt/src/basemap.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
basemap - Plot base maps and frames.
33
"""
44

5+
import warnings
6+
57
from pygmt.alias import Alias, AliasSystem
68
from pygmt.clib import Session
79
from pygmt.helpers import build_arg_list, fmt_docstring, kwargs_to_strings, use_alias
@@ -72,8 +74,9 @@ def basemap(self, projection=None, **kwargs):
7274
[Default is ``"4p/-4p"``] and shade sets the fill style to use for
7375
shading [Default is ``"gray50"``].
7476
rose : str
75-
Draw a map directional rose on the map at the location defined by
76-
the reference and anchor points.
77+
Draw a map directional rose on the map.
78+
79+
Deprecated. Use :py:func:`pygmt.Figure.directional_rose` instead.
7780
compass : str
7881
Draw a map magnetic rose on the map at the location defined by the
7982
reference and anchor points.
@@ -87,5 +90,14 @@ def basemap(self, projection=None, **kwargs):
8790
aliasdict = AliasSystem(
8891
J=Alias(projection, name="projection"),
8992
).merge(kwargs)
93+
94+
if aliasdict.get("Td"):
95+
warnings.warn(
96+
"Parameter 'rose' is deprecated and will be removed in a future version. "
97+
"Use 'Figure.directional_rose' instead.",
98+
DeprecationWarning,
99+
stacklevel=2,
100+
)
101+
90102
with Session() as lib:
91103
lib.call_module(module="basemap", args=build_arg_list(aliasdict))

pygmt/src/directional_rose.py

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
from pygmt.helpers import build_arg_list
1212

1313

14-
def directional_rose(
14+
def directional_rose( # noqa: PLR0913
1515
self,
1616
position,
1717
position_type: Literal[
@@ -22,6 +22,10 @@ def directional_rose(
2222
anchor_offset: Sequence[float | str] | None = None,
2323
label: Sequence[str] | bool = False,
2424
fancy: Literal[1, 2, 3] | bool = False,
25+
box=None,
26+
perspective=None,
27+
verbose=None,
28+
transparency=None,
2529
):
2630
r"""
2731
Add a directional rose to the map.
@@ -81,6 +85,7 @@ def directional_rose(
8185
self._activate_figure()
8286

8387
aliasdict = AliasSystem(
88+
F=Alias(box, name="box"),
8489
Td=[
8590
Alias(
8691
position_type,
@@ -99,7 +104,10 @@ def directional_rose(
99104
Alias(justify, name="justify", prefix="+j"),
100105
Alias(label, name="label", prefix="+l", sep=",", size=4),
101106
Alias(anchor_offset, name="anchor_offset", prefix="+o", sep="/", size=2),
102-
]
107+
],
108+
V=Alias(verbose, name="verbose"),
109+
p=Alias(perspective, name="perspective"),
110+
t=Alias(transparency, name="transparency"),
103111
)
104112

105113
with Session() as lib:

0 commit comments

Comments
 (0)