Skip to content

Commit

Permalink
Add inline example for blockmedian (GenericMappingTools#1730)
Browse files Browse the repository at this point in the history
Co-authored-by: Meghan Jones <[email protected]>
Co-authored-by: Dongdong Tian <[email protected]>
  • Loading branch information
3 people authored and Josh Sixsmith committed Dec 21, 2022
1 parent a95d56e commit cfc640c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pygmt/src/blockm.py
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,16 @@ def blockmedian(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 median values within 5 by 5 minute bins
>>> data_bmedian = pygmt.blockmedian(
... data=data, region=[245, 255, 20, 30], spacing="5m"
... ) # doctest: +SKIP
"""
return _blockm(
block_method="blockmedian", data=data, x=x, y=y, z=z, outfile=outfile, **kwargs
Expand Down

0 comments on commit cfc640c

Please sign in to comment.