Skip to content

Commit 50476ea

Browse files
committed
Updates
1 parent 8ba0992 commit 50476ea

File tree

2 files changed

+17
-10
lines changed

2 files changed

+17
-10
lines changed

pygmt/src/basemap.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,9 @@ def basemap(self, projection=None, **kwargs):
7676
rose : str
7777
Draw a map directional rose on the map.
7878
79-
Deprecated. Use :py:func:`pygmt.Figure.directional_rose` instead.
79+
.. deprecated:: v0.17.0
80+
81+
Use :py:func:`pygmt.Figure.directional_rose` instead.
8082
compass : str
8183
Draw a map magnetic rose on the map at the location defined by the
8284
reference and anchor points.

pygmt/src/directional_rose.py

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@ def directional_rose( # noqa: PLR0913
1515
self,
1616
position: Sequence[str | float] | AnchorCode,
1717
position_type: Literal[
18-
"mapcoords", "inside", "outside", "boxcoords", "plotcoords"
18+
"mapcoords",
19+
"boxcoords",
20+
"plotcoords",
21+
"inside",
22+
"outside",
1923
] = "mapcoords",
2024
width: float | str | None = None,
2125
justify: AnchorCode | None = None,
@@ -33,21 +37,22 @@ def directional_rose( # noqa: PLR0913
3337
Parameters
3438
----------
3539
position/position_type
36-
Location of the rose. The actual meaning of this parameter depends on the
37-
``position_type`` parameter.
40+
Location of the directional rose. The actual meaning of this parameter depends
41+
on the ``position_type`` parameter.
3842
3943
- ``position_type="mapcoords"``: *position* is given as (x, y) in user
4044
coordinates.
4145
- ``position_type="boxcoords"``: *position* is given as (nx, ny) in normalized
4246
coordinates, where (0, 0) is the lower-left corner and (1, 1) is the
43-
upper-right corner of the map.
47+
upper-right corner of the plot.
4448
- ``position_type="plotcoords"``: *position* is given as (x, y) in plot
45-
coordinates.
49+
coordinates, i.e., the distances in inches, centimeters, or points from the
50+
lower left plot origin.
4651
- ``position_type="inside"``: *position* is given as a two-character
47-
justification code, meaning the anchor point of the rose is inside the map
52+
justification code, meaning the anchor point of the rose is inside the plot
4853
bounding box.
4954
- ``position_type="outside"``: *position* is given as a two-character
50-
justification code, but the rose is outside the map bounding box.
55+
justification code, but the rose is outside the plot bounding box.
5156
width
5257
Width of the rose in plot coordinates (append **i** (inch),
5358
**cm** (centimeters), or **p** (points)), or append % for a size in percentage
@@ -92,10 +97,10 @@ def directional_rose( # noqa: PLR0913
9297
name="position_type",
9398
mapping={
9499
"mapcoords": "g",
95-
"inside": "j",
96-
"outside": "J",
97100
"boxcoords": "n",
98101
"plotcoords": "x",
102+
"inside": "j",
103+
"outside": "J",
99104
},
100105
),
101106
Alias(position, name="position", sep="/", size=2),

0 commit comments

Comments
 (0)