Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add inline example for blockmean #1729

Merged
merged 7 commits into from
Feb 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions pygmt/src/blockm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down