Skip to content

Commit 016b7f7

Browse files
committed
update the first figure plotted
1 parent 943c51f commit 016b7f7

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

examples/starter-tutorial/first_figure.py

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -37,20 +37,26 @@
3737
fig = pygmt.Figure()
3838

3939
###############################################################################
40-
# Add elements to the figure using its methods. For example, let's use
41-
# :meth:`pygmt.Figure.basemap` to start the creation of a map. We'll use the
42-
# ``region`` parameter to provide the longitude and latitude bounds, the
43-
# ``projection`` parameter to set the projection to Mercator (**M**) and the
44-
# map width to 15 cm, and the ``frame`` parameter to generate a frame with
45-
# automatic tick and annotation spacings.
46-
47-
fig.basemap(region=[-90, -70, 0, 20], projection="M15c", frame=True)
48-
49-
###############################################################################
50-
# Now we can add coastlines using :meth:`pygmt.Figure.coast` to this map using
51-
# the default resolution, line width, and color:
40+
# To add to a plot object (``fig`` in this example), the PyGMT module is used
41+
# as a method on the class. This example will use the module ``coast``, which
42+
# can be used to create a map without any other modules or external data. The
43+
# ``coast`` module plots the coastlines, borders, and bodies of water using a
44+
# database that is included in GMT.
45+
#
46+
# First, a region for the figure must be selected. This example will plot some
47+
# of the coast of Maine in the northeastern US. A Python list can be passed to
48+
# the ``region`` argument with the minimum and maximum X-values (longitude)
49+
# and the minimum and maximum Y-values (latitude). For this example, the
50+
# minimum (bottom left) coordinates are N43 W69 and the maximum (top right)
51+
# coordinates are N44 W68. Negative values can be passed for latitudes in the
52+
# southern hemisphere or longitudes in the western hemisphere.
53+
#
54+
# In addition to the region, a value needs to be passed to ``coast`` to tell
55+
# it what to plot. In this example, ``coast`` will be told to plot the
56+
# shorelines by passing the Boolean value ``True`` to the ``shorelines``
57+
# parameter.
5258

53-
fig.coast(shorelines=True)
59+
fig.coast(region=[-69, -68, 44, 45], shorelines=True)
5460

5561
###############################################################################
5662
# To see the figure, call :meth:`pygmt.Figure.show`:

0 commit comments

Comments
 (0)