pygmt.clib.Session.extract_region¶
-
Session.
extract_region
()[source]¶ Extract the WESN bounding box of the currently active figure.
Retrieves the information from the PostScript file, so it works for country codes as well.
- Returns
* wesn (1d array) – A 1D numpy array with the west, east, south, and north dimensions of the current figure.
Examples
Using ISO country codes for the regions (for example
'US.HI'
for Hawaii):The country codes can have an extra argument that rounds the region a multiple of the argument (for example,
'US.HI+r5'
will round the region to multiples of 5):