Skip to content

Commit 4dbf5eb

Browse files
committed
Add box and perspective
1 parent bddba5b commit 4dbf5eb

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

pygmt/src/directional_rose.py

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@
99
from pygmt.alias import Alias, AliasSystem
1010
from pygmt.clib import Session
1111
from pygmt.helpers import build_arg_list
12+
from pygmt.params import Box
1213

1314

14-
def directional_rose(
15+
def directional_rose( # noqa: PLR0913
1516
self,
1617
position: Sequence[str | float] | AnchorCode,
1718
position_type: Literal[
@@ -22,6 +23,8 @@ def directional_rose(
2223
width: float | str | None = None,
2324
label: Sequence[str] | bool = False,
2425
fancy: Literal[1, 2, 3] | bool = False,
26+
box: Box | bool = False,
27+
perspective: str | bool = False,
2528
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
2629
| bool = False,
2730
transparency: float | None = None,
@@ -79,6 +82,10 @@ def directional_rose(
7982
ENE-WSW
8083
8184
If set to ``True``, defaults to level 1.
85+
box
86+
Draw a background box around the directional rose. If set to ``True``, draw a
87+
rectangular box using :gmt-term:`MAP_FRAME_PEN`. Otherwise, use a
88+
:class:`pygmt.params.Box` object for more control over the box.
8289
{perspective}
8390
{verbose}
8491
{transparency}
@@ -94,6 +101,7 @@ def directional_rose(
94101
self._activate_figure()
95102

96103
aliasdict = AliasSystem(
104+
F=Alias(box, name="box"),
97105
Td=[
98106
Alias(
99107
position_type,
@@ -113,6 +121,7 @@ def directional_rose(
113121
Alias(label, name="label", prefix="+l", sep=",", size=4),
114122
Alias(width, name="width", prefix="+w"),
115123
],
124+
p=Alias(perspective, name="perspective"),
116125
).add_common(
117126
V=verbose,
118127
t=transparency,

0 commit comments

Comments
 (0)