Skip to content

Commit e2e1daa

Browse files
michaelgrundwillschlitzerMeghan Jonesseisman
authored
Add inline example for blockmean (#1729)
Co-authored-by: Will Schlitzer <[email protected]> Co-authored-by: Meghan Jones <[email protected]> Co-authored-by: Dongdong Tian <[email protected]>
1 parent 308419e commit e2e1daa

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pygmt/src/blockm.py

+10
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,16 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
147147
is not set.
148148
- None if ``outfile`` is set (filtered output will be stored in file
149149
set by ``outfile``).
150+
151+
Example
152+
-------
153+
>>> import pygmt # doctest: +SKIP
154+
>>> # Load a table of ship observations of bathymetry off Baja California
155+
>>> data = pygmt.datasets.load_sample_data(name="bathymetry")
156+
>>> # Calculate block mean values within 5 by 5 minute bins
157+
>>> data_bmean = pygmt.blockmean(
158+
... data=data, region=[245, 255, 20, 30], spacing="5m"
159+
... ) # doctest: +SKIP
150160
"""
151161
return _blockm(
152162
block_method="blockmean", data=data, x=x, y=y, z=z, outfile=outfile, **kwargs

0 commit comments

Comments
 (0)