From 6ebbc120c59d842187a63188536bdecab975c60c Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 9 Feb 2023 23:51:00 +0800 Subject: [PATCH] Add an inline example for load_earth_vertical_gravity_gradient --- .../datasets/earth_vertical_gravity_gradient.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/pygmt/datasets/earth_vertical_gravity_gradient.py b/pygmt/datasets/earth_vertical_gravity_gradient.py index fde1e82ccaa..6100bbce4fa 100644 --- a/pygmt/datasets/earth_vertical_gravity_gradient.py +++ b/pygmt/datasets/earth_vertical_gravity_gradient.py @@ -59,6 +59,23 @@ def load_earth_vertical_gravity_gradient( The :class:`xarray.DataArray` grid doesn't support slice operation, for Earth vertical gravity gradient grids with resolutions of 5 arc-minutes or higher, which are stored as smaller tiles. + + Examples + -------- + + >>> from pygmt.datasets import load_earth_vertical_gravity_gradient + >>> # load the default grid (gridline-registered 1 arc-degree grid) + >>> grid = load_earth_vertical_gravity_gradient() + >>> # load the 30 arc-minutes grid with "gridline" registration + >>> grid = load_earth_vertical_gravity_gradient( + ... resolution="30m", registration="gridline" + ... ) + >>> # load high-resolution (5 arc-minutes) grid for a specific region + >>> grid = load_earth_vertical_gravity_gradient( + ... resolution="05m", + ... region=[120, 160, 30, 60], + ... registration="gridline", + ... ) """ grid = _load_remote_dataset( dataset_name="earth_vgg",