14
14
def directional_rose (
15
15
self ,
16
16
position ,
17
- position_type : Literal ["user" , "justify" , "mirror" , "normalize" , "plot" ] = "user" ,
17
+ position_type : Literal [
18
+ "mapcoords" , "inside" , "outside" , "boxcoords" , "plotcoords"
19
+ ] = "mapcoords" ,
18
20
width : float | str | None = None ,
19
21
justify : AnchorCode | None = None ,
20
- offset : Sequence [float | str ] | None = None ,
22
+ anchor_offset : Sequence [float | str ] | None = None ,
21
23
label : Sequence [str ] | bool = False ,
22
24
fancy : Literal [1 , 2 , 3 ] | bool = False ,
23
25
):
@@ -30,15 +32,17 @@ def directional_rose(
30
32
Location of the rose. The actual meaning of this parameter depends on the
31
33
``position_type`` parameter.
32
34
33
- - ``position_type="user"``: *position* is given as (x, y) in user coordinates.
34
- - ``position_type="normalize"``: *position* is given as (nx, ny) in normalized
35
+ - ``position_type="mapcoords"``: *position* is given as (x, y) in user
36
+ coordinates.
37
+ - ``position_type="boxcoords"``: *position* is given as (nx, ny) in normalized
35
38
coordinates, where (0, 0) is the lower-left corner and (1, 1) is the
36
39
upper-right corner of the map.
37
- - ``position_type="plot"``: *position* is given as (x, y) in plot coordinates.
38
- - ``position_type="justify"``: *position* is given as a two-character
40
+ - ``position_type="plotcoords"``: *position* is given as (x, y) in plot
41
+ coordinates.
42
+ - ``position_type="inside"``: *position* is given as a two-character
39
43
justification code, meaning the anchor point of the rose is inside the map
40
44
bounding box.
41
- - ``position_type="mirror "``: *position* is given as a two-character
45
+ - ``position_type="outside "``: *position* is given as a two-character
42
46
justification code, but the rose is outside the map bounding box.
43
47
width
44
48
Width of the rose in plot coordinates (append **i** (inch),
@@ -57,7 +61,7 @@ def directional_rose(
57
61
ENE-WSW
58
62
59
63
If set to ``True``, it defaults to level 1.
60
- offset
64
+ anchor_offset
61
65
*offset* or (*offset_x*, *offset_y*).
62
66
Offset the anchor point by *offset_x* and *offset_y*. If a single value *offset*
63
67
is given, *offset_y* = *offset_x* = *offset*.
@@ -82,19 +86,19 @@ def directional_rose(
82
86
position_type ,
83
87
name = "position_type" ,
84
88
mapping = {
85
- "user " : "g" ,
86
- "justify " : "j" ,
87
- "mirror " : "J" ,
88
- "normalize " : "n" ,
89
- "plot " : "x" ,
89
+ "mapcoords " : "g" ,
90
+ "inside " : "j" ,
91
+ "outside " : "J" ,
92
+ "boxcoords " : "n" ,
93
+ "plotcoords " : "x" ,
90
94
},
91
95
),
92
- Alias (position , name = "position" , separator = "/" ),
96
+ Alias (position , name = "position" , sep = "/" ),
93
97
Alias (width , name = "width" , prefix = "+w" ),
94
98
Alias (fancy , name = "fancy" , prefix = "+f" ),
95
99
Alias (justify , name = "justify" , prefix = "+j" ),
96
- Alias (label , name = "label" , prefix = "+l" , separator = "," , size = 4 ),
97
- Alias (offset , name = "offset " , prefix = "+o" , separator = "/" , size = [ 1 , 2 ] ),
100
+ Alias (label , name = "label" , prefix = "+l" , sep = "," , size = 4 ),
101
+ Alias (anchor_offset , name = "anchor_offset " , prefix = "+o" , sep = "/" , size = 2 ),
98
102
]
99
103
)
100
104
0 commit comments