pygmt.Figure.inset_begin¶
-
Figure.
inset_begin
(**kwargs)¶ Create an inset within a figure to plot an additional figure.
This function create the location, frame, and margins for an inset figure. This function can only be called once the original figure is created. Plotting functions that are called afterwards add to the inset figure. To stop adding to the inset figure and add to the original figure, use
pygmt.Figure.inset_end
.Full option list at https://docs.generic-mapping-tools.org/latest/inset.html
Aliases:
D = location
F = border
M = margin
V = verbose
- Parameters
xmin/xmax/ymin/ymax[+r][+uunit]] | [g|j|J|n|x]refpoint+wwidth[/height][+jjustify] [+odx[/dy]]
This is the only required argument Define the map inset rectangle on the map. Specify the rectangle in one of three ways:
Append glon/lat for map (user) coordinates, jcode or Jcode for setting the refpoint via a 2-char justification code that refers to the (invisible) projected map bounding box, nxn/yn for normalized (0-1) bounding box coordinates, or xx/y for plot coordinates (inches, cm, points, append unit). All but x requires both
region
andprojection
to be specified. You can offset the reference point via +odx/dy in the direction implied by code or +jjustify.Alternatively, Give west/east/south/north of geographic rectangle bounded by parallels and meridians; append +r if the coordinates instead are the lower left and upper right corners of the desired rectangle. (Or, give xmin/xmax/ymin/ymax of bounding rectangle in projected coordinates and optionally append +uunit [Default coordinate unit is meter (e)].
Append +wwidth[/height] of bounding rectangle or box in plot coordinates (inches, cm, etc.). By default, the anchor point on the scale is assumed to be the bottom left corner (BL), but this can be changed by appending +j followed by a 2-char justification code justify. Note: If j is used then justify defaults to the same as refpoint, if J is used then justify defaults to the mirror opposite of refpoint. Specify inset box attributes via the
border
option [outline only].[+cclearances][+gfill][+i[[gap/]pen]][+p[pen]][+r[radius]][+s[[dx/dy/][shade]]]
If passed
True
, this draws a rectangular border around the map inset using the default pen; specify a different pen with +ppen. Add +gfill to fill the logo box [Default is no fill]. Append +cclearance where clearance is either gap, xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform, separate in x- and y-direction, or individual side spacings between logo and border. Append +i to draw a secondary, inner border as well. We use a uniform gap between borders of 2p and the default pen unless other values are specified. Append +r to draw rounded rectangular borders instead, with a 6p corner radius. You can override this radius by appending another value. Append +s to draw an offset background shaded region. Here, dx/dy indicates the shift relative to the foreground frame [4p/-4p] and shade sets the fill style to use for shading [Default is gray50].margin (int or str or list) – This is clearance that is added around the inside of the inset. Plotting will take place within the inner region only. The margins can be a single value, a pair of values separated (for setting separate horizontal and vertical margins), or the full set of four margins (for setting separate left, right, bottom, and top margins). When passing multiple values, it can be either a list or a string with the values separated by forward slashes [Default is no margins].
verbose (str) –
Select verbosity level [Default is w], which modulates the messages written to stderr. Choose among 7 levels of verbosity:
q - Quiet, not even fatal error messages are produced
e - Error messages only
w - Warnings [Default]
t - Timings (report runtimes for time-intensive algorthms);
i - Informational messages (same as “verbose=True”)
c - Compatibility warnings
d - Debugging messages