88from pygmt ._typing import AnchorCode
99from pygmt .alias import Alias , AliasSystem
1010from pygmt .clib import Session
11+ from pygmt .exceptions import GMTInvalidInput
1112from pygmt .helpers import build_arg_list
1213from pygmt .params import Box
1314
1415
1516def 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