diff --git a/pygmt/src/sphinterpolate.py b/pygmt/src/sphinterpolate.py index 8a19cca64e7..551f9c62be2 100644 --- a/pygmt/src/sphinterpolate.py +++ b/pygmt/src/sphinterpolate.py @@ -11,6 +11,8 @@ ) from pygmt.io import load_dataarray +__doctest_skip__ = ["sphinterpolate"] + @fmt_docstring @use_alias( @@ -55,6 +57,15 @@ def sphinterpolate(data, **kwargs): - :class:`xarray.DataArray` if ``outgrid`` is not set - None if ``outgrid`` is set (grid output will be stored in file set by ``outgrid``) + + Example + ------- + >>> import pygmt + >>> # Load a table of Mars with longitude/latitude/radius columns + >>> mars_shape = pygmt.datasets.load_sample_data(name="mars_shape") + >>> # Perform Delaunay triangulation on the table data + >>> # to produce a grid with a 1 arc-degree spacing + >>> grid = pygmt.sphinterpolate(data=mars_shape, spacing=1, region="g") """ with GMTTempFile(suffix=".nc") as tmpfile: with Session() as lib: