14
14
15
15
def directional_rose ( # noqa: PLR0913
16
16
self ,
17
- position : Sequence [str | float ] | AnchorCode ,
17
+ position : Sequence [float | str ] | AnchorCode ,
18
18
position_type : Literal [
19
19
"mapcoords" , "boxcoords" , "plotcoords" , "inside" , "outside"
20
20
] = "plotcoords" ,
@@ -40,21 +40,29 @@ def directional_rose( # noqa: PLR0913
40
40
Parameters
41
41
----------
42
42
position/position_type
43
- Reference point on the map for the directional rose. The meaning of the
44
- **position** parameter depends on the **position_type** parameter:
43
+ Specify the reference point on the map for the directional rose. The reference
44
+ point can be specified in five different ways, which is selected by the
45
+ **position_type** parameter. The actual reference point is then given by the
46
+ coordinates or code specified by the **position** parameter.
45
47
46
- - ``"mapcoords"``: **position** is given as (x, y) in user coordinates.
47
- - ``"boxcoords"``: **position** is given as (nx, ny) in normalized coordinates,
48
- where (0, 0) is the lower-left corner and (1, 1) is the upper-right corner of
49
- the plot bounding box.
48
+ The **position_type** parameter can be one of the following:
49
+
50
+ - ``"mapcoords"``: **position** is given as (*longitude*, *latitude*) in map
51
+ coordinates.
52
+ - ``"boxcoords"``: **position** is given as (*nx*, *ny*) in normalized
53
+ coordinates, i.e., fractional coordinates between 0 and 1 in both the x and y
54
+ directions. For example, (0, 0) is the lower-left corner and (1, 1) is the
55
+ upper-right corner of the plot bounding box.
50
56
- ``"plotcoords"``: **position** is given as (x, y) in plot coordinates, i.e.,
51
57
the distances in inches, centimeters, or points from the lower left plot
52
58
origin.
53
- - ``"inside"`` or ``"outside"``: **position** is the justification code, meaning
54
- the anchor point of the rose is inside or outside the plot bounding box.
59
+ - ``"inside"`` or ``"outside"``: **position** is one of the nine
60
+ :doc:`2-character justification codes </techref/justification_codes>`, meaning
61
+ placing the reference point at specific locations, either inside or outside
62
+ the plot bounding box.
55
63
anchor
56
- Anchor point of the directional rose, set by a
57
- :doc:`2-character justification code </techref/justification_codes>`.
64
+ Anchor point of the directional rose, specified by one of the
65
+ :doc:`2-character justification codes </techref/justification_codes>`.
58
66
The default value depends on the **position_type** parameter.
59
67
60
68
- ``position_type="inside"``: **anchor** defaults to the same as **position**.
@@ -84,8 +92,8 @@ def directional_rose( # noqa: PLR0913
84
92
If set to ``True``, defaults to level 1.
85
93
box
86
94
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 .
95
+ rectangular box using :gmt-term:`MAP_FRAME_PEN`. Otherwise, pass a
96
+ :class:`pygmt.params.Box` object for more style control. .
89
97
{perspective}
90
98
{verbose}
91
99
{transparency}
0 commit comments