diff --git a/examples/gallery/symbols/custom_symbols.py b/examples/gallery/symbols/custom_symbols.py index 3947e873ff2..cbf26506df5 100644 --- a/examples/gallery/symbols/custom_symbols.py +++ b/examples/gallery/symbols/custom_symbols.py @@ -15,7 +15,7 @@ fig = pygmt.Figure() fig.basemap(region=[0, 8, 0, 3], projection="X12c/4c", frame=True) -# define pen and fontstlye for annotations +# define pen and fontstyle for annotations pen = "1p,black" font = "15p,Helvetica-Bold" diff --git a/examples/get-started/first_figure.py b/examples/get-started/first_figure.py index 7345753dce6..910d918dd83 100644 --- a/examples/get-started/first_figure.py +++ b/examples/get-started/first_figure.py @@ -4,8 +4,8 @@ This tutorial page covers the basics of creating a figure using PyGMT - a Python wrapper for the Generic Mapping Tools (GMT). It will only use -the ``coast`` method for plotting. Later examples will address other PyGMT -methods. +the :meth:`pygmt.Figure.coast` method for plotting. Later examples will +address other PyGMT methods. """ ############################################################################### @@ -21,8 +21,8 @@ # Loading the library # ------------------- # -# The first step is to import ``pygmt``. All methods and figure generation is -# accessible from the :mod:`pygmt` top level package. +# The first step is to import :mod:`pygmt`. All methods and figure generation +# are accessible from the :mod:`pygmt` top level package. # sphinx_gallery_thumbnail_number = 4 import pygmt @@ -38,10 +38,11 @@ ############################################################################### # To add to a plot object (``fig`` in this example), the PyGMT module is used -# as a method on the class. This example will use the ``coast`` method, which -# can be used to create a map without any other methods, modules or external -# data. The ``coast`` method plots the coastlines, borders, and bodies of water -# using a database that is included in GMT. +# as a method on the class. This example will use the +# :meth:`pygmt.Figure.coast` method, which can be used to create a map without +# any other methods, modules or external data. The :meth:`pygmt.Figure.coast` +# method plots the coastlines, borders, and bodies of water using a database +# that is included in GMT. # # First, a region for the figure must be selected. This example will plot some # of the coast of Maine in the northeastern US. A Python list can be passed to @@ -51,11 +52,12 @@ # right) coordinates are (N44.75, W68). Negative values can be passed for # latitudes in the southern hemisphere or longitudes in the western hemisphere. # -# In addition to the region, an argument needs to be passed to ``coast`` to -# tell it what to plot. In this example, ``coast`` will be told to plot the -# shorelines by passing the Boolean value ``True`` to the ``shorelines`` -# parameter. The ``shorelines`` parameter has other options for finer control, -# but setting it to ``True`` uses the default values. +# In addition to the region, an argument needs to be passed to +# :meth:`pygmt.Figure.coast` to tell it what to plot. In this example, +# :meth:`pygmt.Figure.coast` will be told to plot the shorelines by passing the +# Boolean value ``True`` to the ``shorelines`` parameter. The ``shorelines`` +# parameter has other options for finer control, but setting it to ``True`` +# uses the default values. fig.coast(region=[-69, -68, 43.75, 44.75], shorelines=True) @@ -74,9 +76,9 @@ # # When plotting colors in PyGMT, there are multiple # :gmt-docs:`color codes `, that can be used. This includes -# standard GMT color names (like ``skyblue``), R/G/B levels (like ``0/0/255``), -# a hex value (like ``#333333``), or a graylevel (like ``50``). For this -# example, GMT color names are used. +# standard GMT color names (like ``"skyblue"``), R/G/B levels (like +# ``"0/0/255"``), a hex value (like ``"#333333"``), or a gray level (like +# ``"gray50"``). For this example, GMT color names are used. fig = pygmt.Figure() fig.coast( @@ -102,7 +104,7 @@ # projections are explained in the :doc:`projection ` # gallery. For this example, the Mercator projection is set using ``"M"``. # The width of the figure will be 10 centimeters, as set by ``"10c"``. -# The map size can also be set in inches using "i" (e.g. a 5 inch wide +# The map size can also be set in inches using "i" (e.g. a 5-inch wide # Mercator projection would use ``"M5i"``). fig = pygmt.Figure() diff --git a/examples/projections/cyl/cyl_universal_transverse_mercator.py b/examples/projections/cyl/cyl_universal_transverse_mercator.py index 40fe4c03e4d..cd238962bfe 100644 --- a/examples/projections/cyl/cyl_universal_transverse_mercator.py +++ b/examples/projections/cyl/cyl_universal_transverse_mercator.py @@ -2,19 +2,33 @@ Universal Transverse Mercator ============================= -A particular subset of the transverse Mercator is the Universal Transverse -Mercator (UTM) which was adopted by the US Army for large-scale military maps. -Here, the globe is divided into 60 zones between 84°S and 84°N, most of which -are 6° (in longitude) wide. Each of these UTM zones have their unique central -meridian. Furthermore, each zone is divided into latitude bands but these are -not needed to specify the projection for most cases. +A particular subset of the +:doc:`transverse Merctor ` +is the Universal Transverse Mercator (UTM) which was adopted by the US Army +for large-scale military maps. Here, the globe is divided into 60 zones +between 84°S and 84°N, most of which are 6° (in longitude) wide. +Each of these UTM zones have their unique central meridian. +Furthermore, each zone is divided into latitude bands but these are +not needed to specify the projection for most cases. See Figure +:ref:`Universal Transverse Mercator ` for all zone designations. + +.. _GMT_utm_zones: + +.. figure:: https://docs.generic-mapping-tools.org/latest/_images/GMT_utm_zones.png # noqa: W505 + :width: 700 px + :align: center + + Universal Transverse Mercator zone layout. In order to minimize the distortion in any given zone, a scale factor of 0.9996 -has been factored into the formulae. This makes the UTM projection a secant -projection and not a tangent projection like the transverse Mercator above. The -scale only varies by 1 part in 1,000 from true scale at equator. The -ellipsoidal projection expressions are accurate for map areas that extend less -than 10° away from the central meridian. +has been factored into the formulae (although a standard, you can change this +with :gmt-term:`PROJ_SCALE_FACTOR`). This makes the UTM projection a *secant* +projection and not a *tangent* projection like the +:doc:`transverse Merctor `. +The scale only varies by 1 part in 1,000 from true scale at equator. The +ellipsoidal projection expressions are accurate for map areas that extend +less than 10° away from the central meridian. For larger regions we use the +conformal latitude in the general spherical formulae instead. **u**\ *zone/scale* or **U**\ *zone/width* diff --git a/examples/tutorials/advanced/contour_map.py b/examples/tutorials/advanced/contour_map.py index d60793b21ca..5e4f6cf6081 100644 --- a/examples/tutorials/advanced/contour_map.py +++ b/examples/tutorials/advanced/contour_map.py @@ -31,7 +31,7 @@ # Contour line settings # --------------------- # -# Use the ``annotation`` and ``interval`` arguments to adjust contour line +# Use the ``annotation`` and ``interval`` parameters to adjust contour line # intervals. In the example below, there are contour intervals every 250 meters # and annotated contour lines every 1,000 meters. @@ -47,8 +47,8 @@ # Contour limits # -------------- # -# The ``limit`` argument sets the minimum and maximum values for the contour -# lines. The argument takes the low and high values, and is either a list (as +# The ``limit`` parameter sets the minimum and maximum values for the contour +# lines. The parameter takes the low and high values, and is either a list (as # below) or a string ``limit="-4000/-2000"``. fig = pygmt.Figure() @@ -64,7 +64,7 @@ # Map settings # ------------ # -# The :meth:`pygmt.Figure.grdcontour` method accepts additional arguments, +# The :meth:`pygmt.Figure.grdcontour` method accepts additional parameters, # including setting the projection and frame. fig = pygmt.Figure() @@ -85,7 +85,7 @@ # The :meth:`pygmt.Figure.grdimage` method can be used to add a # colormap to the contour map. It must be called prior to # :meth:`pygmt.Figure.grdcontour` to keep the contour lines visible on the -# final map. If the ``projection`` argument is specified in the +# final map. If the ``projection`` parameter is specified in the # :meth:`pygmt.Figure.grdimage` method, it does not need to be repeated in the # :meth:`pygmt.Figure.grdcontour` method. diff --git a/examples/tutorials/basics/lines.py b/examples/tutorials/basics/lines.py index 981fdc313d3..393777d7e13 100644 --- a/examples/tutorials/basics/lines.py +++ b/examples/tutorials/basics/lines.py @@ -44,7 +44,7 @@ ############################################################################### # To plot multiple lines, :meth:`pygmt.Figure.plot` needs to be used for each -# additional line. Arguments such as ``region``, ``projection``, and ``frame`` +# additional line. Parameters such as ``region``, ``projection``, and ``frame`` # do not need to be repeated in subsequent uses. fig = pygmt.Figure()