Skip to content

Commit 3eb7f09

Browse files
committed
The position parameter is required
1 parent f2a505e commit 3eb7f09

File tree

1 file changed

+10
-4
lines changed

1 file changed

+10
-4
lines changed

pygmt/src/directional_rose.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,14 @@
88
from pygmt._typing import AnchorCode
99
from pygmt.alias import Alias, AliasSystem
1010
from pygmt.clib import Session
11+
from pygmt.exceptions import GMTInvalidInput
1112
from pygmt.helpers import build_arg_list
1213
from pygmt.params import Box
1314

1415

1516
def directional_rose( # noqa: PLR0913
1617
self,
17-
position: Sequence[float | str] | AnchorCode,
18+
position: Sequence[float | str] | AnchorCode | None = None,
1819
position_type: Literal[
1920
"mapcoords", "boxcoords", "plotcoords", "inside", "outside"
2021
] = "plotcoords",
@@ -91,9 +92,10 @@ def directional_rose( # noqa: PLR0913
9192
9293
If set to ``True``, defaults to level 1.
9394
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.
9799
{perspective}
98100
{verbose}
99101
{transparency}
@@ -108,6 +110,10 @@ def directional_rose( # noqa: PLR0913
108110
"""
109111
self._activate_figure()
110112

113+
if position is None:
114+
msg = "Parameter 'position' is required."
115+
raise GMTInvalidInput(msg)
116+
111117
aliasdict = AliasSystem(
112118
F=Alias(box, name="box"),
113119
Td=[

0 commit comments

Comments
 (0)