Skip to content

Commit a4a72ad

Browse files
Inline examples: Use "longitude" and "latitude" instead of "x" and "y" and add units in comments (#2740)
1 parent e64cfef commit a4a72ad

File tree

13 files changed

+28
-28
lines changed

13 files changed

+28
-28
lines changed

pygmt/src/blockm.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
155155
>>> import pygmt
156156
>>> # Load a table of ship observations of bathymetry off Baja California
157157
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
158-
>>> # Calculate block mean values within 5 by 5 minute bins
158+
>>> # Calculate block mean values within 5 by 5 arc-minute bins
159159
>>> data_bmean = pygmt.blockmean(
160160
... data=data, region=[245, 255, 20, 30], spacing="5m"
161161
... )
@@ -242,7 +242,7 @@ def blockmedian(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
242242
>>> import pygmt
243243
>>> # Load a table of ship observations of bathymetry off Baja California
244244
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
245-
>>> # Calculate block median values within 5 by 5 minute bins
245+
>>> # Calculate block median values within 5 by 5 arc-minute bins
246246
>>> data_bmedian = pygmt.blockmedian(
247247
... data=data, region=[245, 255, 20, 30], spacing="5m"
248248
... )
@@ -329,7 +329,7 @@ def blockmode(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
329329
>>> import pygmt
330330
>>> # Load a table of ship observations of bathymetry off Baja California
331331
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
332-
>>> # Calculate block mode values within 5 by 5 minute bins
332+
>>> # Calculate block mode values within 5 by 5 arc-minute bins
333333
>>> data_bmode = pygmt.blockmode(
334334
... data=data, region=[245, 255, 20, 30], spacing="5m"
335335
... )

pygmt/src/grd2xyz.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,8 @@ def grd2xyz(grid, output_type="pandas", outfile=None, **kwargs):
131131
Example
132132
-------
133133
>>> import pygmt
134-
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to 30,
135-
>>> # and a y-range of 15 to 25
134+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
135+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
136136
>>> grid = pygmt.datasets.load_earth_relief(
137137
... resolution="30m", region=[10, 30, 15, 25]
138138
... )

pygmt/src/grdclip.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ def grdclip(grid, **kwargs):
8383
Example
8484
-------
8585
>>> import pygmt
86-
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to 30,
87-
>>> # and a y-range of 15 to 25
86+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
87+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
8888
>>> grid = pygmt.datasets.load_earth_relief(
8989
... resolution="30m", region=[10, 30, 15, 25]
9090
... )

pygmt/src/grdcut.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,13 +93,13 @@ def grdcut(grid, **kwargs):
9393
Example
9494
-------
9595
>>> import pygmt
96-
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to 30,
97-
>>> # and a y-range of 15 to 25
96+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
97+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
9898
>>> grid = pygmt.datasets.load_earth_relief(
9999
... resolution="30m", region=[10, 30, 15, 25]
100100
... )
101-
>>> # Create a new grid from an input grid, with an x-range of 12 to 15,
102-
>>> # and a y-range of 21 to 24
101+
>>> # Create a new grid from an input grid, with a longitude range of
102+
>>> # 12° E to 15° E and a latitude range of 21° N to 24° N
103103
>>> new_grid = pygmt.grdcut(grid=grid, region=[12, 15, 21, 24])
104104
"""
105105
with GMTTempFile(suffix=".nc") as tmpfile:

pygmt/src/grdgradient.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ def grdgradient(grid, **kwargs):
155155
Example
156156
-------
157157
>>> import pygmt
158-
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to 30,
159-
>>> # and a y-range of 15 to 25
158+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
159+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
160160
>>> grid = pygmt.datasets.load_earth_relief(
161161
... resolution="30m", region=[10, 30, 15, 25]
162162
... )

pygmt/src/grdhisteq.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ def compute_bins(
296296
-------
297297
>>> import pygmt
298298
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
299-
>>> # 10°E to 30°E, and a latitude range of 15°N to 25°N
299+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
300300
>>> grid = pygmt.datasets.load_earth_relief(
301301
... resolution="30m", region=[10, 30, 15, 25]
302302
... )

pygmt/src/grdlandmask.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,8 +97,8 @@ def grdlandmask(**kwargs):
9797
Example
9898
-------
9999
>>> import pygmt
100-
>>> # Create a landmask grid with an x-range of 125 to 130,
101-
>>> # and a y-range of 30 to 35
100+
>>> # Create a landmask grid with a longitude range of 125° E to 130° E, a
101+
>>> # latitude range of 30° N to 35° N, and a grid spacing of 1 arc-degree
102102
>>> landmask = pygmt.grdlandmask(spacing=1, region=[125, 130, 30, 35])
103103
"""
104104
if kwargs.get("I") is None or kwargs.get("R") is None:

pygmt/src/grdproject.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def grdproject(grid, **kwargs):
104104
Example
105105
-------
106106
>>> import pygmt
107-
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to 30,
108-
>>> # and a y-range of 15 to 25
107+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
108+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
109109
>>> grid = pygmt.datasets.load_earth_relief(
110110
... resolution="30m", region=[10, 30, 15, 25]
111111
... )

pygmt/src/grdsample.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,13 @@ def grdsample(grid, **kwargs):
8181
Example
8282
-------
8383
>>> import pygmt
84-
>>> # Load a grid of @earth_relief_30m data, with an x-range of 10 to 30,
85-
>>> # and a y-range of 15 to 25
84+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
85+
>>> # 10° E to 30° E, and a latitude range of 15° N to 25° N
8686
>>> grid = pygmt.datasets.load_earth_relief(
8787
... resolution="30m", region=[10, 30, 15, 25]
8888
... )
8989
>>> # Create a new grid from an input grid, change the registration,
90-
>>> # and set both x- and y-spacing to 0.5 degrees
90+
>>> # and set both x- and y-spacing to 0.5 arc-degrees
9191
>>> new_grid = pygmt.grdsample(
9292
... grid=grid, translate=True, spacing=[0.5, 0.5]
9393
... )

pygmt/src/grdtrack.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,8 +270,8 @@ def grdtrack(grid, points=None, newcolname=None, outfile=None, **kwargs):
270270
Example
271271
-------
272272
>>> import pygmt
273-
>>> # Load a grid of @earth_relief_30m data, with an x-range of -118 to
274-
>>> # -107, and a y-range of -49 to -42
273+
>>> # Load a grid of @earth_relief_30m data, with a longitude range of
274+
>>> # -118° E to -107° E, and a latitude range of -49° N to -42° N
275275
>>> grid = pygmt.datasets.load_earth_relief(
276276
... resolution="30m", region=[-118, -107, -49, -42]
277277
... )

0 commit comments

Comments
 (0)