Skip to content

Commit 5cca871

Browse files
michaelgrundMeghan Jonesseisman
authored
Add inline example for blockmode (#1731)
Co-authored-by: Meghan Jones <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
1 parent bc196db commit 5cca871

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pygmt/src/blockm.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,16 @@ def blockmode(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
303303
is not set.
304304
- None if ``outfile`` is set (filtered output will be stored in file
305305
set by ``outfile``).
306+
307+
Example
308+
-------
309+
>>> import pygmt # doctest: +SKIP
310+
>>> # Load a table of ship observations of bathymetry off Baja California
311+
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
312+
>>> # Calculate block mode values within 5 by 5 minute bins
313+
>>> data_bmode = pygmt.blockmode(
314+
... data=data, region=[245, 255, 20, 30], spacing="5m"
315+
... ) # doctest: +SKIP
306316
"""
307317
return _blockm(
308318
block_method="blockmode", data=data, x=x, y=y, z=z, outfile=outfile, **kwargs

0 commit comments

Comments
 (0)