Skip to content

Commit 308419e

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

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
@@ -225,6 +225,16 @@ def blockmedian(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
225225
is not set.
226226
- None if ``outfile`` is set (filtered output will be stored in file
227227
set by ``outfile``).
228+
229+
Example
230+
-------
231+
>>> import pygmt # doctest: +SKIP
232+
>>> # Load a table of ship observations of bathymetry off Baja California
233+
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
234+
>>> # Calculate block median values within 5 by 5 minute bins
235+
>>> data_bmedian = pygmt.blockmedian(
236+
... data=data, region=[245, 255, 20, 30], spacing="5m"
237+
... ) # doctest: +SKIP
228238
"""
229239
return _blockm(
230240
block_method="blockmedian", data=data, x=x, y=y, z=z, outfile=outfile, **kwargs

0 commit comments

Comments
 (0)