@@ -17,10 +17,40 @@ class Position(BaseParam):
1717 The class for positioning GMT embellishments.
1818 """
1919
20- location : str | tuple [float | str , float | str ]
20+ #: Specify the reference point on the plot. The method of defining the reference
21+ #: point is controlled by ``type``, and the exact location is set by ``position``.
22+ location : Sequence [float | str ] | AnchorCode
23+
24+ #: Specify the type of coordinates used to define the reference point. It can be
25+ #: one of the following values:
26+ #:
27+ #: - ``"mapcoords"``: ``position`` is specified as (*longitude*, *latitude*) in map
28+ #: coordinates.
29+ #: - ``"boxcoords"``: ``position`` is specified as (*nx*, *ny*) in normalized
30+ #: coordinates, i.e., fractional values between 0 and 1 along the x- and y-axes.
31+ #: - ``"plotcoords"``: ``position`` is specified as (*x*, *y*) in plot coordinates,
32+ #: i.e., distances from the lower-left plot origin given in inches, centimeters,
33+ #: or points.
34+ #: - ``"inside"`` or ``"outside"``: ``position`` is one of the nine
35+ #: :doc:`two-character justification codes </techref/justification_codes>`,
36+ #: indicating a specific location relative to the plot bounding box.
37+ #:
2138 type : Literal ["mapcoords" , "inside" , "outside" , "boxcoords" , "plotcoords" ]
22- anchor : AnchorCode
23- offset : Sequence [float | str ]
39+
40+ #: Specify the anchor point of the GMT logo, using one of the
41+ #: :doc:`2-character justification codes </techref/justification_codes>`. The
42+ #: default value depends on ``position_type``.
43+ #:
44+ #: - ``position_type="inside"``: ``anchor`` defaults to the same as ``position``.
45+ #: - ``position_type="outside"``: ``anchor`` defaults to the mirror opposite of
46+ #: ``position``.
47+ #: - Otherwise, ``anchor`` defaults to ``"MC"`` (middle center).
48+ anchor : AnchorCode | None = None
49+
50+ #: Specifies an offset for the anchor point as *offset* or (*offset_x*, *offset_y*).
51+ #: If a single value *offset* is given, both *offset_x* and *offset_y* are set to
52+ #: *offset*.
53+ offset : Sequence [float | str ] | None = None
2454
2555 @property
2656 def _aliases (self ):
@@ -37,6 +67,6 @@ def _aliases(self):
3767 },
3868 ),
3969 Alias (self .location , name = "location" , sep = "/" , size = 2 ),
40- Alias (self .anchor , name = "anchor" ),
41- Alias (self .offset , name = "offset" , sep = "/" , size = 2 ),
70+ Alias (self .anchor , name = "anchor" , prefix = "+j" ),
71+ Alias (self .offset , name = "offset" , prefix = "+o" , sep = "/" , size = 2 ),
4272 ]
0 commit comments