Skip to content

Commit 34b30aa

Browse files
willschlitzerMeghan Jones
andauthored
Replace argument with parameter in gallery examples and tutorials (#943)
Co-authored-by: Meghan Jones <[email protected]>
1 parent c93517a commit 34b30aa

24 files changed

+82
-78
lines changed

examples/gallery/coast/borders.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22
Political Boundaries
33
--------------------
44
5-
The ``borders`` argument of :meth:`pygmt.Figure.coast` specifies levels of political
5+
The ``borders`` parameter of :meth:`pygmt.Figure.coast` specifies levels of political
66
boundaries to plot and the pen used to draw them. Choose from the list of boundaries
77
below:
88
9-
* 1 = National boundaries
10-
* 2 = State boundaries within the Americas
11-
* 3 = Marine boundaries
12-
* a = All boundaries (1-3)
9+
* **1** = National boundaries
10+
* **2** = State boundaries within the Americas
11+
* **3** = Marine boundaries
12+
* **a** = All boundaries (1-3)
1313
1414
For example, to draw national boundaries with 1p thickness black lines use
1515
``borders="1/1p,black"``. You can draw multiple boundaries by passing in a list to

examples/gallery/coast/land_and_water.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
Color land and water
33
--------------------
44
5-
The ``land`` and ``water`` arguments of :meth:`pygmt.Figure.coast` specify a color to
5+
The ``land`` and ``water`` parameters of :meth:`pygmt.Figure.coast` specify a color to
66
fill in the land and water masses, respectively. You can use standard GMT color names or
77
give a hex value (like ``#333333``).
88
"""

examples/gallery/grid/grdview_surface.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
55
The :meth:`pygmt.Figure.grdview()` method can plot 3-D surfaces with ``surftype="s"``. Here,
66
we supply the data as an :class:`xarray.DataArray` with the coordinate vectors ``x`` and
7-
``y`` defined. Note that the ``perspective`` argument here controls the azimuth and
8-
elevation angle of the view. We provide a list of two arguments to ``frame`` — the
7+
``y`` defined. Note that the ``perspective`` parameter here controls the azimuth and
8+
elevation angle of the view. We provide a list of two arguments to ``frame`` - the
9+
first argument specifies the :math:`x`- and :math:`y`:-axes frame attributes and the
910
second argument, prepended with ``"z"``, specifies the :math:`z`-axis frame attributes.
10-
Specifying the same scale for the ``projection`` and ``zcale`` arguments ensures equal
11-
axis scaling. The ``shading`` argument specifies illumination; here we choose an azimuth of
11+
Specifying the same scale for the ``projection`` and ``zcale`` parameters ensures equal
12+
axis scaling. The ``shading`` parameter specifies illumination; here we choose an azimuth of
1213
45° with ``shading="+a45"``.
1314
"""
1415

examples/gallery/grid/track_sampling.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44
55
The :func:`pygmt.grdtrack` function samples a raster grid's value along specified
66
points. We will need to input a 2D raster to ``grid`` which can be an
7-
:class:`xarray.DataArray`. The ``points`` argument can be a :class:`pandas.DataFrame` table where
8-
the first two columns are x and y (or longitude and latitude). Note also that there is a
9-
``newcolname`` argument that will be used to name the new column of values we sampled
10-
from the grid.
7+
:class:`xarray.DataArray`. The argument passed to the ``points`` parameter can be a
8+
:class:`pandas.DataFrame` table where the first two columns are x and y (or longitude
9+
and latitude). Note also that there is a ``newcolname`` parameter that will be used to
10+
name the new column of values sampled from the grid.
1111
12-
Alternatively, we can provide a NetCDF file path to ``grid``. An ASCII file path can
13-
also be accepted for ``points``, but an ``outfile`` argument will then need to be set
14-
to name the resulting output ASCII file.
12+
Alternatively, a NetCDF file path can be passed to ``grid``. An ASCII file path can
13+
also be accepted for ``points``. To save an output ASCII file, a file name argument
14+
needs to be passed to the ``outfile`` parameter.
1515
"""
1616

1717
import pygmt

examples/gallery/line/line-custom-cpt.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
-----------------------------
44
55
The color of the lines made by :meth:`pygmt.Figure.plot` can be set according to a
6-
custom CPT and assigned with the ``pen`` argument.
6+
custom CPT and assigned with the ``pen`` parameter.
77
8-
The custom CPT can be used by setting the plot command's ``cmap`` argument to ``True``. The
9-
``zvalue`` argument sets the z-value (color) to be used from the custom CPT, and the line
10-
color is set as the z-value by using **+z** when setting the ``pen`` color.
8+
The custom CPT can be used by setting the plot command's ``cmap`` parameter to
9+
``True``. The ``zvalue`` parameter sets the z-value (color) to be used from the custom
10+
CPT, and the line color is set as the z-value by using **+z** when setting the ``pen``
11+
color.
1112
1213
"""
1314

examples/gallery/line/linestyles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
The :meth:`pygmt.Figure.plot` method can plot lines in different styles.
66
The default line style is a 0.25-point wide, black, solid line, and can be
7-
customized via the ``pen`` argument.
7+
customized with the ``pen`` parameter.
88
99
A *pen* in GMT has three attributes: *width*, *color*, and *style*.
1010
The *style* attribute controls the appearance of the line.

examples/gallery/plot/colorbar.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
--------
44
55
The :meth:`pygmt.Figure.colorbar` method creates a color scalebar. We must
6-
specify the colormap via the ``cmap`` argument, and optionally set the
7-
placement via the ``position`` argument. The full list of color palette tables
6+
specify the colormap via the ``cmap`` parameter, and optionally set the
7+
placement via the ``position`` parameter. The full list of color palette tables
88
can be found at :gmt-docs:`cookbook/cpts.html`. You can set the ``position`` of
99
the colorbar using the following options:
1010
@@ -18,7 +18,7 @@
1818
point.
1919
- **n**: using normalized (0-1) coordinates, e.g. ``position="n0.4/0.8"``.
2020
21-
Note that the anchor point defaults to the bottom left (BL). Append ``+h`` to
21+
Note that the anchor point defaults to the bottom left (**BL**). Append ``+h`` to
2222
``position`` to get a horizontal colorbar instead of a vertical one.
2323
"""
2424
import pygmt
@@ -49,7 +49,8 @@
4949
# with a length/width (+w) of 7cm by 0.5cm and a box for NaN values (+n)
5050
position="JMR+o1c/0c+w7c/0.5c+n+mc",
5151
# Note that the label 'Elevation' is moved to the opposite side and plotted
52-
# vertically as a column of text using '+mc' in the position argument above
52+
# vertically as a column of text using '+mc' in the position parameter
53+
# above
5354
frame=["x+lElevation", "y+lm"],
5455
scale=10,
5556
)

examples/gallery/plot/image.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
The :meth:`pygmt.Figure.image` method can be used to read and
55
place a raster image file or an Encapsulated PostScript file
66
on a map. We must specify the file as *str* via the ``imagefile``
7-
argument or simply use the filename as the first argument. You can
7+
parameter or simply use the filename as the first argument. You can
88
also use a full URL pointing to your desired image. The ``position``
9-
argument allows us to set a reference point on the map for the image.
9+
parameter allows us to set a reference point on the map for the image.
1010
1111
"""
1212
import os
@@ -25,7 +25,7 @@
2525
box=True,
2626
)
2727

28-
# clean up the image downloaded in the current directory
28+
# clean up the downloaded image in the current directory
2929
os.remove("gmt-logo.png")
3030

3131
fig.show()

examples/gallery/plot/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
55
The :meth:`pygmt.Figure.legend` method can automatically create a legend for
66
symbols plotted using :meth:`pygmt.Figure.plot`. Legend entries are only
7-
created when the ``label`` argument is used.
7+
created when the ``label`` parameter is used.
88
"""
99
import pygmt
1010

examples/gallery/plot/meca.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
55
The :meth:`pygmt.Figure.meca` method can plot focal mechanisms, or beachballs.
66
We can specify the focal mechanism nodal planes or moment tensor components as
7-
a dict using the ``spec`` argument (or they can be specified as a 1d or 2d array,
7+
a dict using the ``spec`` parameter (or they can be specified as a 1d or 2d array,
88
or within a specified file). The size of plotted beachballs can be specified
9-
using the ``scale`` argument.
9+
using the ``scale`` parameter.
1010
"""
1111

1212
import pygmt

0 commit comments

Comments
 (0)