The **-R** option
^^^^^^^^^^^^^^^^^

**Syntax**

.. _-R:

**-R**\ *xmin*/*xmax*/*ymin*/*ymax*\ [**+r**][**+u**\ *unit*]
    Specify the region of interest. |Add_-R|

**Description**

The **-R** option defines the map region or data domain of interest. It may be specified in one of several ways
(options 1 and 3 are shown in panels a) and b) respectively of the Figure :ref:`Map region <gmt_region>`):

1. **-R**\ *xmin*/*xmax*/*ymin*/*ymax*. This is the standard way to specify Cartesian data domains and
   geographic regions when using map projections where meridians and parallels are rectilinear, where *xmin*, *xmax*,
   *ymin*, and *ymax* refer to the data limits.

#. **-R**\ *xmin*/*xmax*/*ymin*/*ymax*\ **+u**\ *unit*. Append **+u**\ *unit* to the option 1 to specify a region in
   projected units (e.g., UTM meters) where *xmin*/*xmax*/*ymin*/*ymax* are Cartesian projected coordinates compatible
   with the chosen projection and *unit* is an allowable :ref:`distance unit <dist-units>` [e]. The coordinates are relative
   to the standard longitude and latitude indicated in the projection (**-J**).  For projected regions centered on
   (0,0) you may use the short-hand **-R**\ *halfwidth*\ [/*halfheight*]\ **+u**\ *unit*, where *halfheight* defaults
   to *halfwidth* if not given. This short-hand requires the **+u** modifier.

#. **-R**\ *xlleft*/*ylleft*/*xuright*/*yuright*\ **+r**. This form is useful for map projections that are oblique,
   making meridians and parallels poor choices for map boundaries. Here, we instead specify the lower left corner and
   upper right corner geographic coordinates, followed by the modifier **+r**. This form guarantees a rectangular map
   even though lines of equal longitude and latitude are not straight lines.

#. **-R**\ **g** or **-R**\ **d**. These forms can be used to quickly specify the global domain (0/360 for **-Rg** and
   -180/+180 for **-Rd** in longitude, with -90/+90 in latitude).

#. **-R**\ *gridfile*. This will copy the domain settings found for the grid in specified file. Note that depending on
   the nature of the calling module, this mechanism will also set grid spacing and possibly the grid registration (see
   :ref:`reference/options:Grid registration: The **-r** option`\ ).

#. **-R**\ *code1,code2,...*\ [**+e**\ \|\ **r**\ \|\ **R**\ *incs*]. This indirectly supplies the region by
   consulting the DCW (Digital Chart of the World) database and derives the bounding regions for one or more
   countries given by the codes. Simply append one or more comma-separated countries using either the two-character
   `ISO 3166-1 alpha-2 convention <https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2>`_ (e.g., -RNO) or the full
   country name (e.g., -RNorway). To select a state within a country (if available), append .state (e.g, -RUS.TX). To specify a whole continent, spell out the full continent name (e.g., -RAfrica).
   Finally, append any :ref:`DCW collection <dcw-collections>` abbreviations or full names for the extent of the
   collection or named region. All names are case-insensitive. The following modifiers can be appended:

   - **+r** to adjust the region boundaries to be multiples of the steps indicated by *inc*, *xinc*/*yinc*, or
     *winc*/*einc*/*sinc*/*ninc* [default is no adjustment]. For example, **-R**\ *FR*\ **+r**\ 1 will select the
     national bounding box of France rounded to nearest integer degree, where *inc* can be positive to expand the
     region or negative to shrink the region.
   - **+R** to adjust the region by adding the amounts specified by *inc*, *xinc*/*yinc*, or
     *winc*/*einc*/*sinc*/*ninc* [default is no extension], where *inc* can be positive to expand the
     region or negative to shrink the region.
   - **+e** to adjust the region boundaries to be multiples of the steps indicated by *inc*, *xinc*/*yinc*, or
     *winc*/*einc*/*sinc*/*ninc*, while ensuring that the bounding box is adjusted by at least 0.25 times the
     increment [default is no adjustment], where *inc* can be positive to expand the region or negative to shrink
     the region.

#. **-R**\ *justify*\ *x0*/*y0*/*nx*/*ny*, where *justify* is a 2-character combination of **L**\|\ **C**\|\ **R** (for
   left, center, or right) and **T**\|\ **M**\|\ **B** (for top, middle, or bottom) (e.g., **BL** for lower left). The
   two character code *justify* indicates which point on a rectangular grid region the *x0*/*y0* coordinates refer to
   and the grid dimensions *nx* and *ny* are used with grid spacings given via **-I** to create the corresponding
   region. This method can be used when creating grids. For example, **-RCM**\ *25*/*25*/*50*/*50* specifies a
   *50*\ x\ *50* grid centered on *25*\ ,\ *25*.

#. **-R**\ *xmin*/*xmax*/*ymin*/*ymax*/*zmin*/*zmax*. This method can be used for perspective views with the **-Jz**
   and the :ref:`-p <option_-p>` option, where the z-range (*zmin*/*zmax*) is appended to the first method to indicate
   the third dimension. This is not used for :ref:`-p <option_-p>` without **-Jz**, in which case a perspective view of
   the place is plotted with no third dimension.

#. **-Ra**\ [**uto**] or **-Re**\ [**xact**]. Under modern mode, and for *plotting* modules only, you can automatically
   determine the region from the data used. You can either get the exact area using **-Re** [Default if no **-R**
   is given] or a slightly larger area sensibly rounded outwards to the next multiple of increments that depend on
   the data range using **-Ra**.
