Skip to content

Commit 6921f58

Browse files
Add inline example to load_earth_free_air_anomaly (#2257)
1 parent 312f6b0 commit 6921f58

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

pygmt/datasets/earth_free_air_anomaly.py

+19
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77
from pygmt.datasets.load_remote_dataset import _load_remote_dataset
88
from pygmt.helpers import kwargs_to_strings
99

10+
__doctest_skip__ = ["load_earth_free_air_anomaly"]
11+
1012

1113
@kwargs_to_strings(region="sequence")
1214
def load_earth_free_air_anomaly(resolution="01d", region=None, registration=None):
@@ -57,6 +59,23 @@ def load_earth_free_air_anomaly(resolution="01d", region=None, registration=None
5759
The :class:`xarray.DataArray` grid doesn't support slice operation, for
5860
Earth free-air anomaly with resolutions of 5 arc-minutes or higher,
5961
which are stored as smaller tiles.
62+
63+
Examples
64+
--------
65+
66+
>>> from pygmt.datasets import load_earth_free_air_anomaly
67+
>>> # load the default grid (gridline-registered 1 arc-degree grid)
68+
>>> grid = load_earth_free_air_anomaly()
69+
>>> # load the 30 arc-minutes grid with "gridline" registration
70+
>>> grid = load_earth_free_air_anomaly(
71+
... resolution="30m", registration="gridline"
72+
... )
73+
>>> # load high-resolution (5 arc-minutes) grid for a specific region
74+
>>> grid = load_earth_free_air_anomaly(
75+
... resolution="05m",
76+
... region=[120, 160, 30, 60],
77+
... registration="gridline",
78+
... )
6079
"""
6180
grid = _load_remote_dataset(
6281
dataset_name="earth_free_air_anomaly",

0 commit comments

Comments
 (0)