8
8
from pygmt ._typing import AnchorCode
9
9
from pygmt .alias import Alias , AliasSystem
10
10
from pygmt .clib import Session
11
+ from pygmt .exceptions import GMTInvalidInput
11
12
from pygmt .helpers import build_arg_list
12
13
from pygmt .params import Box
13
14
14
15
15
16
def directional_rose ( # noqa: PLR0913
16
17
self ,
17
- position : Sequence [float | str ] | AnchorCode ,
18
+ position : Sequence [float | str ] | AnchorCode | None = None ,
18
19
position_type : Literal [
19
20
"mapcoords" , "boxcoords" , "plotcoords" , "inside" , "outside"
20
21
] = "plotcoords" ,
@@ -91,9 +92,10 @@ def directional_rose( # noqa: PLR0913
91
92
92
93
If set to ``True``, defaults to level 1.
93
94
box
94
- Draw a background box around the directional rose. If set to ``True``, draw a
95
- rectangular box using :gmt-term:`MAP_FRAME_PEN`. Otherwise, pass a
96
- :class:`pygmt.params.Box` object for more style control..
95
+ Draw a background box behind the directional rose. If set to ``True``, a simple
96
+ rectangular box is drawn using :gmt-term:`MAP_FRAME_PEN`. To customize the box
97
+ appearance, pass a :class:`pygmt.params.Box` object to control style, fill, pen,
98
+ and other box properties.
97
99
{perspective}
98
100
{verbose}
99
101
{transparency}
@@ -108,6 +110,10 @@ def directional_rose( # noqa: PLR0913
108
110
"""
109
111
self ._activate_figure ()
110
112
113
+ if position is None :
114
+ msg = "Parameter 'position' is required."
115
+ raise GMTInvalidInput (msg )
116
+
111
117
aliasdict = AliasSystem (
112
118
F = Alias (box , name = "box" ),
113
119
Td = [
0 commit comments