@@ -22,30 +22,45 @@ def directional_rose(
22
22
"outside" ,
23
23
] = "plotcoords" ,
24
24
width : float | str | None = None ,
25
- justify : AnchorCode | None = None ,
25
+ anchor : AnchorCode | None = None ,
26
26
anchor_offset : Sequence [float | str ] | None = None ,
27
27
label : Sequence [str ] | bool = False ,
28
28
fancy : Literal [1 , 2 , 3 ] | bool = False ,
29
29
):
30
30
r"""
31
- Add a directional rose to the map.
31
+ Add a directional rose on the map.
32
+
33
+ The directional rose is plotted at the location defined by the reference point
34
+ (specified by the **position** and *position_type** parameters) and anchor point
35
+ (set by the **anchor** and **anchor_offset** parameters).
32
36
33
37
Parameters
34
38
----------
35
39
position/position_type
36
- Location of the directional rose. The actual meaning of this parameter depends
37
- on the `` position_type`` parameter.
40
+ Reference point on the map for the directional rose. The meaning of the
41
+ **position** parameter depends on the ** position_type** parameter:
38
42
39
- - ``"mapcoords"``: *position* is given as (x, y) in user coordinates.
40
- - ``"boxcoords"``: *position* is given as (nx, ny) in normalized coordinates,
43
+ - ``"mapcoords"``: ** position* * is given as (x, y) in user coordinates.
44
+ - ``"boxcoords"``: ** position* * is given as (nx, ny) in normalized coordinates,
41
45
where (0, 0) is the lower-left corner and (1, 1) is the upper-right corner of
42
- the plot.
43
- - ``"plotcoords"``: *position* is given as (x, y) in plot coordinates, i.e., the
44
- distances in inches, centimeters, or points from the lower left plot origin.
45
- - ``"inside"``: *position* is given as a two-character justification code,
46
- meaning the anchor point of the rose is inside the plot bounding box.
47
- - ``"outside"``: *position* is given as a two-character justification code, but
48
- the rose is outside the plot bounding box.
46
+ the plot bounding box.
47
+ - ``"plotcoords"``: **position** is given as (x, y) in plot coordinates, i.e.,
48
+ the distances in inches, centimeters, or points from the lower left plot
49
+ origin.
50
+ - ``"inside"`` or ``"outside"``: **position** is the justification code, meaning
51
+ the anchor point of the rose is inside or outside the plot bounding box.
52
+ anchor
53
+ The anchor point of the rose, set by a 2-character justification code.
54
+ The default value depends on the **position_type** parameter.
55
+
56
+ - ``position_type="inside"``, **anchor** defaults to the same as **position**.
57
+ - ``position_type="outside"``, **anchor** defaults to the mirror opposite of
58
+ **position**.
59
+ - Otherwise, **anchor** defaults to ``"MC"`` (middle center).
60
+ anchor_offset
61
+ *offset* or (*offset_x*, *offset_y*).
62
+ Offset the anchor point by *offset_x* and *offset_y*. If a single value *offset*
63
+ is given, *offset_y* = *offset_x* = *offset*.
49
64
width
50
65
Width of the rose in plot coordinates (append **i** (inch),
51
66
**cm** (centimeters), or **p** (points)), or append % for a size in percentage
@@ -63,15 +78,6 @@ def directional_rose(
63
78
ENE-WSW
64
79
65
80
If set to ``True``, it defaults to level 1.
66
- anchor_offset
67
- *offset* or (*offset_x*, *offset_y*).
68
- Offset the anchor point by *offset_x* and *offset_y*. If a single value *offset*
69
- is given, *offset_y* = *offset_x* = *offset*.
70
- justify
71
- Set the anchor point. Specify a two-character (order independent) code. Choose
72
- from vertical **T**\(op), **M**\(iddle), or **B**\(ottom) and horizontal
73
- **L**\(eft), **C**\(entre), or **R**\(ight).
74
-
75
81
{perspective}
76
82
{verbose}
77
83
{transparency}
@@ -100,11 +106,11 @@ def directional_rose(
100
106
},
101
107
),
102
108
Alias (position , name = "position" , sep = "/" , size = 2 ),
103
- Alias (width , name = "width" , prefix = "+w" ),
104
- Alias (fancy , name = "fancy" , prefix = "+f" ),
105
- Alias (justify , name = "justify" , prefix = "+j" ),
109
+ Alias (fancy , name = "fancy" , prefix = "+f" ), # +F is not supported yet.
110
+ Alias (anchor , name = "anchor" , prefix = "+j" ),
106
111
Alias (label , name = "label" , prefix = "+l" , sep = "," , size = 4 ),
107
112
Alias (anchor_offset , name = "anchor_offset" , prefix = "+o" , sep = "/" , size = 2 ),
113
+ Alias (width , name = "width" , prefix = "+w" ),
108
114
],
109
115
)
110
116
0 commit comments