Skip to content

Commit ad609c3

Browse files
Apply suggestions from code review
Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com>
1 parent 2ff1550 commit ad609c3

File tree

2 files changed

+27
-28
lines changed

2 files changed

+27
-28
lines changed

pygmt/helpers/decorators.py

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -164,32 +164,32 @@
164164
(:gmt-term:`PROJ_AUX_LATITUDE`). Geodesic distance calculations is also
165165
controlled by method (:gmt-term:`PROJ_GEODESIC`).""",
166166
"n": r"""
167-
interpolation : str
168-
[**b**\|\ **c**\|\ **l**\|\ **n**][**+a**][**+b**\ *BC*][**+c**]
169-
[**+t**\ *threshold*].
170-
Select interpolation mode for grids.
171-
172-
- **b** to use B-spline smoothing.
173-
- **c** to use bicubic interpolation.
174-
- **l** to use bilinear interpolation.
175-
- **n** to use nearest-neighbor value (for example to plot
176-
categorical data).
177-
178-
The following modifiers are supported:
179-
180-
- **+a** to switch off antialiasing (where supported) [default uses
181-
antialiasing].
182-
- **+b** to override boundary conditions used, by appending *g* for
183-
geographic, *p* for periodic, or *n* for natural boundary conditions.
184-
For the latter two you may append **x** or **y** to specify just one
185-
direction, otherwise both are assumed.
186-
- **+c** to clip the interpolated grid to input z-min/z-max
187-
[default may exceed limits].
188-
- **+t** to control how close to nodes with NaNs the interpolation
189-
will go based on *threshold*. A *threshold* of 1.0 requires all
190-
(4 or 16) nodes involved in interpolation to be non-NaN. For example,
191-
0.5 will interpolate about half way from a non-NaN value and 0.1 will
192-
go about 90% of the way [default is 0.5].""",
167+
interpolation : str
168+
[**b**\|\ **c**\|\ **l**\|\ **n**][**+a**][**+b**\ *BC*][**+c**]\
169+
[**+t**\ *threshold*].
170+
Select interpolation mode for grids.
171+
172+
- **b** to use B-spline smoothing.
173+
- **c** to use bicubic interpolation.
174+
- **l** to use bilinear interpolation.
175+
- **n** to use nearest-neighbor value (for example to plot
176+
categorical data).
177+
178+
The following modifiers are supported:
179+
180+
- **+a** to switch off antialiasing (where supported) [default uses
181+
antialiasing].
182+
- **+b** to override boundary conditions used, by appending *g* for
183+
geographic, *p* for periodic, or *n* for natural boundary
184+
conditions. For the latter two you may append **x** or **y** to
185+
specify just one direction, otherwise both are assumed.
186+
- **+c** to clip the interpolated grid to input z-min/z-max
187+
[default may exceed limits].
188+
- **+t** to control how close to nodes with NaNs the interpolation
189+
will go based on *threshold*. A *threshold* of 1.0 requires all
190+
(4 or 16) nodes involved in interpolation to be non-NaN. For
191+
example, 0.5 will interpolate about half way from a non-NaN value
192+
and 0.1 will go about 90% of the way [default is 0.5].""",
193193
"p": r"""
194194
perspective : list or str
195195
[**x**\|\ **y**\|\ **z**]\ *azim*\[/*elev*\[/*zlevel*]]\

pygmt/src/grdsample.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,13 +58,12 @@ def grdsample(grid, **kwargs):
5858
translate : bool
5959
Translate between grid and pixel registration; if the input is
6060
grid-registered, the output will be pixel-registered and vice-versa.
61-
{n}
6261
registration : str or bool
6362
[**g**\ |\ **p**\ ].
6463
Set registration to **g**\ ridline or **p**\ ixel.
65-
6664
{V}
6765
{f}
66+
{n}
6867
{x}
6968
7069
Returns

0 commit comments

Comments
 (0)