Skip to content

Commit b1801da

Browse files
Add inline example for grdlandmask (#1721)
1 parent c1f1887 commit b1801da

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

pygmt/src/grdlandmask.py

+9
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,15 @@ def grdlandmask(**kwargs):
9292
- :class:`xarray.DataArray` if ``outgrid`` is not set
9393
- None if ``outgrid`` is set (grid output will be stored in file set by
9494
``outgrid``)
95+
96+
Example
97+
-------
98+
>>> import pygmt # doctest: +SKIP
99+
>>> # Create a landmask grid with an x-range of 125 to 130,
100+
>>> # and a y-range of 30 to 35
101+
>>> landmask = pygmt.grdlandmask(
102+
... spacing=1, region=[125, 130, 30, 35]
103+
... ) # doctest: +SKIP
95104
"""
96105
if "I" not in kwargs or "R" not in kwargs:
97106
raise GMTInvalidInput("Both 'region' and 'spacing' must be specified.")

0 commit comments

Comments
 (0)