Skip to content

Commit 92d14a7

Browse files
committed
Update docstring placeholders to the string.Template syntax
1 parent bb24135 commit 92d14a7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

55 files changed

+494
-494
lines changed

pygmt/src/basemap.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,12 @@ def basemap(
5858
5959
Parameters
6060
----------
61-
{projection}
61+
$projection
6262
zscale/zsize
6363
Set z-axis scaling or z-axis size.
64-
{region}
64+
$region
6565
*Required if this is the first plot command.*
66-
{frame}
66+
$frame
6767
map_scale : str
6868
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
6969
**+w**\ *length*.
@@ -92,11 +92,11 @@ def basemap(
9292
compass : str
9393
Draw a map magnetic rose on the map at the location defined by the
9494
reference and anchor points.
95-
{verbose}
96-
{panel}
97-
{coltypes}
98-
{perspective}
99-
{transparency}
95+
$verbose
96+
$panel
97+
$coltypes
98+
$perspective
99+
$transparency
100100
"""
101101
self._activate_figure()
102102

pygmt/src/binstats.py

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def binstats(
7676
----------
7777
data
7878
A file name of an ASCII data table or a 2-D {table-classes}.
79-
{outgrid}
79+
$outgrid
8080
statistic
8181
Choose the statistic that will be computed per node based on the points that are
8282
within *radius* distance of the node. Select one of:
@@ -115,14 +115,14 @@ def binstats(
115115
computed while the count will be the sum of the weights instead of
116116
number of points. If the weights are actually uncertainties
117117
(one sigma) then append **+s** and weight = 1/sigma.
118-
{spacing}
119-
{region}
120-
{verbose}
121-
{aspatial}
122-
{binary}
123-
{header}
124-
{incols}
125-
{registration}
118+
$spacing
119+
$region
120+
$verbose
121+
$aspatial
122+
$binary
123+
$header
124+
$incols
125+
$registration
126126
127127
Returns
128128
-------

pygmt/src/blockm.py

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -126,9 +126,9 @@ def blockmean(
126126
{table-classes}.
127127
x/y/z : 1-D arrays
128128
Arrays of x and y coordinates and values z of the data points.
129-
{output_type}
130-
{outfile}
131-
{spacing}
129+
$output_type
130+
$outfile
131+
$spacing
132132
summary : str
133133
[**m**\|\ **n**\|\ **s**\|\ **w**].
134134
Type of summary values calculated by blockmean.
@@ -137,18 +137,18 @@ def blockmean(
137137
- **n**: report the number of input points inside each block
138138
- **s**: report the sum of all z-values inside a block
139139
- **w**: report the sum of weights
140-
{region}
141-
{verbose}
142-
{aspatial}
143-
{binary}
144-
{nodata}
145-
{find}
146-
{incols}
147-
{coltypes}
148-
{header}
149-
{outcols}
150-
{registration}
151-
{wrap}
140+
$region
141+
$verbose
142+
$aspatial
143+
$binary
144+
$nodata
145+
$find
146+
$incols
147+
$coltypes
148+
$header
149+
$outcols
150+
$registration
151+
$wrap
152152
153153
Returns
154154
-------
@@ -241,21 +241,21 @@ def blockmedian(
241241
{table-classes}.
242242
x/y/z : 1-D arrays
243243
Arrays of x and y coordinates and values z of the data points.
244-
{output_type}
245-
{outfile}
246-
{spacing}
247-
{region}
248-
{verbose}
249-
{aspatial}
250-
{binary}
251-
{nodata}
252-
{find}
253-
{coltypes}
254-
{header}
255-
{incols}
256-
{outcols}
257-
{registration}
258-
{wrap}
244+
$output_type
245+
$outfile
246+
$spacing
247+
$region
248+
$verbose
249+
$aspatial
250+
$binary
251+
$nodata
252+
$find
253+
$coltypes
254+
$header
255+
$incols
256+
$outcols
257+
$registration
258+
$wrap
259259
260260
Returns
261261
-------
@@ -350,21 +350,21 @@ def blockmode(
350350
{table-classes}.
351351
x/y/z : 1-D arrays
352352
Arrays of x and y coordinates and values z of the data points.
353-
{output_type}
354-
{outfile}
355-
{spacing}
356-
{region}
357-
{verbose}
358-
{aspatial}
359-
{binary}
360-
{nodata}
361-
{find}
362-
{coltypes}
363-
{header}
364-
{incols}
365-
{outcols}
366-
{registration}
367-
{wrap}
353+
$output_type
354+
$outfile
355+
$spacing
356+
$region
357+
$verbose
358+
$aspatial
359+
$binary
360+
$nodata
361+
$find
362+
$coltypes
363+
$header
364+
$incols
365+
$outcols
366+
$registration
367+
$wrap
368368
369369
Returns
370370
-------

pygmt/src/coast.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ def coast(
7979
8080
Parameters
8181
----------
82-
{projection}
83-
{region}
82+
$projection
83+
$region
8484
*Required if this is the first plot command.*
85-
{area_thresh}
86-
{frame}
85+
$area_thresh
86+
$frame
8787
lakes : str or list
8888
*fill*\ [**+l**\|\ **+r**].
8989
Set the shade, color, or pattern for lakes and river-lakes. The
@@ -172,10 +172,10 @@ def coast(
172172
to any of the continent codes (e.g. ``"=EU"`` for Europe). Append
173173
**+p**\ *pen* to draw polygon outlines [Default is no outline] and
174174
**+g**\ *fill* to fill them [Default is no fill].
175-
{panel}
176-
{perspective}
177-
{transparency}
178-
{verbose}
175+
$panel
176+
$perspective
177+
$transparency
178+
$verbose
179179
180180
Example
181181
-------

pygmt/src/colorbar.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def colorbar(
7171
----------
7272
frame : str or list
7373
Set colorbar boundary frame, labels, and axes attributes.
74-
{cmap}
74+
$cmap
7575
position : str
7676
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
7777
[**+w**\ *length*\ [/\ *width*]]\ [**+e**\ [**b**\|\ **f**][*length*]]\
@@ -135,10 +135,10 @@ def colorbar(
135135
may be in plot distance units or given as relative fractions and will
136136
be automatically scaled so that the sum of the widths equals the
137137
requested colorbar length.
138-
{verbose}
139-
{panel}
140-
{perspective}
141-
{transparency}
138+
$verbose
139+
$panel
140+
$perspective
141+
$transparency
142142
143143
Example
144144
-------

pygmt/src/contour.py

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def contour( # noqa: PLR0913
7979
{table-classes}.
8080
x/y/z : 1-D arrays
8181
Arrays of x and y coordinates and values z of the data points.
82-
{projection}
83-
{region}
82+
$projection
83+
$region
8484
annotation : float, list, or str
8585
Specify or disable annotated contour levels, modifies annotated
8686
contours specified in ``levels``.
@@ -91,7 +91,7 @@ def contour( # noqa: PLR0913
9191
- Adjust the appearance by appending different modifiers, e.g.,
9292
``"annot_int+f10p+gred"`` gives annotations with a font size of 10 points and
9393
a red filled box. For all available modifiers see :gmt-docs:`contour.html#a`.
94-
{frame}
94+
$frame
9595
levels : float, list, or str
9696
Specify the contour lines to generate.
9797
@@ -140,16 +140,16 @@ def contour( # noqa: PLR0913
140140
to be of the format [*annotcontlabel*][/*contlabel*]. If either
141141
label contains a slash (/) character then use ``|`` as the
142142
separator for the two labels instead.
143-
{verbose}
144-
{binary}
145-
{panel}
146-
{nodata}
147-
{find}
148-
{coltypes}
149-
{header}
150-
{incols}
151-
{perspective}
152-
{transparency}
143+
$verbose
144+
$binary
145+
$panel
146+
$nodata
147+
$find
148+
$coltypes
149+
$header
150+
$incols
151+
$perspective
152+
$transparency
153153
"""
154154
self._activate_figure()
155155

pygmt/src/dimfilter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ def dimfilter(
5353
5454
Parameters
5555
----------
56-
{grid}
57-
{outgrid}
56+
$grid
57+
$outgrid
5858
distance : int or str
5959
Distance flag tells how grid (x,y) relates to filter width, as follows:
6060
@@ -111,7 +111,7 @@ def dimfilter(
111111
region : str or list
112112
[*xmin*, *xmax*, *ymin*, *ymax*].
113113
Define the region of the output points [Default is the same as the input].
114-
{verbose}
114+
$verbose
115115
116116
Returns
117117
-------

pygmt/src/filter1d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,8 +46,8 @@ def filter1d(
4646
4747
Parameters
4848
----------
49-
{output_type}
50-
{outfile}
49+
$output_type
50+
$outfile
5151
filter_type : str
5252
**type**\ *width*\ [**+h**].
5353
Set the filter **type**. Choose among convolution and non-convolution

pygmt/src/grd2cpt.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def grd2cpt(
9696
9797
Parameters
9898
----------
99-
{grid}
99+
$grid
100100
transparency : float or str
101101
Set a constant level of transparency (0-100) for all color slices. Append **+a**
102102
to also affect the foreground, background, and NaN colors [Default is no
@@ -182,7 +182,7 @@ def grd2cpt(
182182
Produce a wrapped (cyclic) color table that endlessly repeats its
183183
range. Note that ``cyclic=True`` cannot be set together with
184184
``categorical=True``.
185-
{verbose}
185+
$verbose
186186
187187
Example
188188
-------

pygmt/src/grd2xyz.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -59,17 +59,17 @@ def grd2xyz(
5959
6060
Parameters
6161
----------
62-
{grid}
63-
{output_type}
64-
{outfile}
62+
$grid
63+
$output_type
64+
$outfile
6565
cstyle : str
6666
[**f**\|\ **i**].
6767
Replace the x- and y-coordinates on output with the corresponding
6868
column and row numbers. These start at 0 (C-style counting); append
6969
**f** to start at 1 (Fortran-style counting). Alternatively, append
7070
**i** to write just the two columns *index* and *z*, where *index*
7171
is the 1-D indexing that GMT uses when referring to grid nodes.
72-
{region}
72+
$region
7373
Adding ``region`` will select a subsection of the grid. If this
7474
subsection exceeds the boundaries of the grid, only the common region
7575
will be output.
@@ -84,7 +84,7 @@ def grd2xyz(
8484
this by appending **+u**\ *unit*. For such grids, the area
8585
varies with latitude and also sees special cases for
8686
gridline-registered layouts at sides, corners, and poles.
87-
{verbose}
87+
$verbose
8888
convention : str
8989
[*flags*].
9090
Write a 1-column ASCII [or binary] table. Output will be organized
@@ -115,12 +115,12 @@ def grd2xyz(
115115
- **d**: 8-byte floating point double precision
116116
117117
Default format is scanline orientation of ASCII numbers: **TLa**.
118-
{binary}
119-
{nodata}
120-
{coltypes}
121-
{header}
122-
{outcols}
123-
{skiprows}
118+
$binary
119+
$nodata
120+
$coltypes
121+
$header
122+
$outcols
123+
$skiprows
124124
125125
Returns
126126
-------

0 commit comments

Comments
 (0)