Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tiny fixes for the plot tutorial #1026

Merged
merged 8 commits into from
Mar 10, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 4 additions & 5 deletions examples/tutorials/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,7 @@


########################################################################################
# We'll use :meth:`pygmt.Figure.plot` method to plot circles on the locations of the
# hypocenters of the earthquakes.
# We'll use the :meth:`pygmt.Figure.plot` method to plot circles on the earthquake epicenters.

fig = pygmt.Figure()
fig.basemap(region=region, projection="M15c", frame=True)
Expand All @@ -52,7 +51,7 @@

########################################################################################
# We used the style ``c0.3c`` which means "circles of 0.3 centimeter size". The ``pen``
# parameter controls the outline of the symbols and the ``color`` controls the fill.
# parameter controls the outline of the symbols and the ``color`` parameter controls the fill.
#
# We can map the size of the circles to the earthquake magnitude by passing an array to
# the ``sizes`` parameter. Because the magnitude is on a logarithmic scale, it helps to
Expand All @@ -72,12 +71,12 @@
fig.show()

########################################################################################
# Notice that we didn't include the size in the ``style`` argument this time, just the
# Notice that we didn't include the size in the ``style`` parameter this time, just the
# symbol ``c`` (circles) and the unit ``c`` (centimeter). So in this case, the sizes
# will be interpreted as being in centimeters.
#
# We can also map the colors of the markers to the depths by passing an array to the
# ``color`` argument and providing a colormap name (``cmap``). We can even use the new
# ``color`` parameter and providing a colormap name (``cmap``). We can even use the new
# matplotlib colormap "viridis". Here, we first create a continuous colormap
# ranging from the minimum depth to the maximum depth of the earthquakes
# using :func:`pygmt.makecpt`, then set ``cmap=True`` in :func:`pygmt.Figure.plot`
Expand Down