File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change 13
13
)
14
14
from pygmt .io import load_dataarray
15
15
16
+ __doctest_skip__ = ["grdfill" ]
17
+
16
18
17
19
@fmt_docstring
18
20
@use_alias (
@@ -62,6 +64,17 @@ def grdfill(grid, **kwargs):
62
64
- :class:`xarray.DataArray` if ``outgrid`` is not set
63
65
- None if ``outgrid`` is set (grid output will be stored in file set by
64
66
``outgrid``)
67
+
68
+ Example
69
+ -------
70
+ >>> import pygmt
71
+ >>> # Load a bathymetric grid with missing data
72
+ >>> earth_relief_holes = pygmt.datasets.load_sample_data(
73
+ ... name="earth_relief_holes"
74
+ ... )
75
+ >>> # Perform grid filling operations on the sample grid
76
+ >>> # Set all empty values to "20"
77
+ >>> filled_grid = pygmt.grdfill(grid=earth_relief_holes, mode="c20")
65
78
"""
66
79
if kwargs .get ("A" ) is None and kwargs .get ("L" ) is None :
67
80
raise GMTInvalidInput ("At least parameter 'mode' or 'L' must be specified." )
You can’t perform that action at this time.
0 commit comments