pygmt.Figure.logo
- Figure.logo(position=None, position_type='plotcoords', anchor=None, anchor_offset=None, height=None, width=None, projection=None, verbose=False, panel=False, transparency=None, **kwargs)
Plot the GMT logo.
By default, the GMT logo is 2 inches wide and 1 inch high and will be positioned relative to the current plot origin. The position can be changed by specifying the reference point (via
position_type
andposition
) and anchor point (viaanchor
andanchor_offset
). Refer to /techref/reference_anchor_points for details about the positioning.Full GMT docs at https://docs.generic-mapping-tools.org/6.5/gmtlogo.html.
Aliases:
F = box
R = region
S = style
D = position/position_type/anchor/anchor_offset/width/height
J = projection
V = verbose
c = panel
t = transparency
- Parameters:
position/position_type –
Specify the reference point on the plot for the GMT logo. The method of defining the the reference point is controlled by position_type, and the exact location is set by position.
The position_type parameter can take one of the following values:
"mapcoords"
: position is specified as (longitude, latitude) in map coordinates. Example: (120, -45) places the reference point at 120°E, 45°S."boxcoords"
: position is specified as (nx, ny) in normalized coordinates, i.e., fractional values between 0 and 1 along the x- and y-axes. Example: (0, 0) corresponds to the lower-left corner, and (1, 1) to the upper-right corner of the plot bounding box."plotcoords"
: position is specified as (x, y) in plot coordinates, i.e., distances from the lower-left plot origin given in inches, centimeters, or points. Example: (“1c”, “2c”) places the reference point 1 cm to the right and 2 cm above the plot origin."inside"
or"outside"
: position is one of the nine :doc:two-character justification codes </techref/justification_codes>, indicating a specific location relative to the plot bounding box. Example:"TL"
places the reference point at the top-left corner, either inside or outside the bounding box.
anchor (
Optional
[Literal
['TL'
,'TC'
,'TR'
,'ML'
,'MC'
,'MR'
,'BL'
,'BC'
,'BR'
]], default:None
) –Specify the anchor point of the GMT logo, using one of the 2-character justification codes. The default value depends on position_type.
position_type="inside"
: anchor defaults to the same as position.position_type="outside"
: anchor defaults to the mirror opposite of position.Otherwise, anchor defaults to
"MC"
(middle center).
anchor_offset (
Sequence
[float
|str
] |None
, default:None
) – Specifies an offset for the anchor point as offset or (offset_x, offset_y). If a single value offset is given, both offset_x and offset_y are set to offset.width/height – Width or height of the GMT logo. Since the aspect ratio is fixed, only one of the two can be specified.
box (bool or str) – If set to
True
, draw a rectangular border around the GMT logo.style (str) –
[l|n|u]. Control what is written beneath the map portion of the logo.
l to plot the text label “The Generic Mapping Tools” [Default]
n to skip the label placement
u to place the URL to the GMT site
projection (str) – projcode[projparams/]width|scale. Select map projection.
region (str or list) – xmin/xmax/ymin/ymax[+r][+uunit]. Specify the region of interest.
verbose (bool or str) – Select verbosity level [Full usage].
panel (
int
|tuple
[int
,int
] |bool
, default:False
) –Select a specific subplot panel. Only allowed when used in
Figure.subplot
mode.True
to advance to the next panel in the selected order.index to specify the index of the desired panel.
(row, col) to specify the row and column of the desired panel.
The panel order is determined by the
Figure.subplot
method. row, col and index all start at 0.transparency (float) – Set transparency level, in [0-100] percent range [Default is
0
, i.e., opaque]. Only visible when PDF or raster format output is selected. Only the PNG format selection adds a transparency layer in the image (for further processing).