Add inline example for blockmean
@@ -147,6 +147,16 @@ def blockmean(data=None, x=None, y=None, z=None, outfile=None, **kwargs):
is not set.
- None if ``outfile`` is set (filtered output will be stored in file
set by ``outfile``).
+
+ Example
+ -------
+ >>> import pygmt # doctest: +SKIP
+ >>> # Load a table of ship observations of bathymetry off Baja California
+ >>> data = pygmt.datasets.load_sample_data(name="bathymetry")
+ >>> # Calculate block mean values within 5 by 5 minute bins
+ >>> data_bmean = pygmt.blockmean(
+ ... data=data, region=[245, 255, 20, 30], spacing="5m"
+ ... ) # doctest: +SKIP
"""
return _blockm(
block_method="blockmean", data=data, x=x, y=y, z=z, outfile=outfile, **kwargs
