Skip to content

Commit 0e259d3

Browse files
committed
add inline example for sphinterpolate
1 parent d8a7f9e commit 0e259d3

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

pygmt/src/sphinterpolate.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
)
1212
from pygmt.io import load_dataarray
1313

14+
__doctest_skip__ = ["sphinterpolate"]
15+
1416

1517
@fmt_docstring
1618
@use_alias(
@@ -55,6 +57,14 @@ def sphinterpolate(data, **kwargs):
5557
- :class:`xarray.DataArray` if ``outgrid`` is not set
5658
- None if ``outgrid`` is set (grid output will be stored in file set by
5759
``outgrid``)
60+
61+
Example
62+
-------
63+
>>> import pygmt
64+
>>> # Load a file of the shape of Mars
65+
>>> mars_shape = pygmt.datasets.load_sample_data("mars_shape")
66+
>>> # Perform a Delaunay triangulation of the data
67+
>>> grid = pygmt.sphinterpolate(data=mars_shape, spacing=1, region="g")
5868
"""
5969
with GMTTempFile(suffix=".nc") as tmpfile:
6070
with Session() as lib:

0 commit comments

Comments
 (0)