Skip to content

Commit c0f17ef

Browse files
Use "general" verb form in docstrings (#2376)
1 parent 1ddbd9f commit c0f17ef

33 files changed

+130
-125
lines changed

pygmt/figure.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -209,10 +209,10 @@ def psconvert(self, **kwargs):
209209
anti_aliasing : str
210210
[**g**\|\ **p**\|\ **t**\][**1**\|\ **2**\|\ **4**].
211211
Set the anti-aliasing options for **g**\ raphics or **t**\ ext.
212-
Append the size of the subsample box (1, 2, or 4) [4]. [Default is
213-
no anti-aliasing (same as bits = 1)].
212+
Append the size of the subsample box (1, 2, or 4) [Default is
213+
``"4"``]. [Default is no anti-aliasing (same as bits = 1).]
214214
fmt : str
215-
Sets the output format, where **b** means BMP, **e** means EPS,
215+
Set the output format, where **b** means BMP, **e** means EPS,
216216
**E** means EPS with PageSize command, **f** means PDF, **F** means
217217
multi-page PDF, **j** means JPEG, **g** means PNG, **G** means
218218
transparent PNG (untouched regions are transparent), **m** means
@@ -273,21 +273,21 @@ def savefig(
273273
The desired figure file name, including the extension. See the list
274274
of supported formats and their extensions above.
275275
transparent : bool
276-
If True, will use a transparent background for the figure. Only
277-
valid for PNG format.
276+
If ``True``, will use a transparent background for the figure.
277+
Only valid for PNG format.
278278
crop : bool
279-
If True, will crop the figure canvas (page) to the plot area.
279+
If ``True``, will crop the figure canvas (page) to the plot area.
280280
anti_alias: bool
281-
If True, will use anti aliasing when creating raster images (PNG,
282-
JPG, TIFF). More specifically, it passes arguments ``t2``
281+
If ``True``, will use anti-aliasing when creating raster images
282+
(PNG, JPG, TIFF). More specifically, it passes arguments ``t2``
283283
and ``g2`` to the ``anti_aliasing`` parameter of
284284
:meth:`pygmt.Figure.psconvert`. Ignored if creating vector
285285
graphics.
286286
show: bool
287-
If True, will open the figure in an external viewer.
287+
If ``True``, will open the figure in an external viewer.
288288
dpi : int
289-
Set raster resolution in dpi. Default is 720 for PDF, 300 for
290-
others.
289+
Set raster resolution in dpi [Default is ``720`` for PDF, ``300``
290+
for others].
291291
**kwargs : dict
292292
Additional keyword arguments passed to
293293
:meth:`pygmt.Figure.psconvert`. Valid parameters are ``gs_path``,

pygmt/helpers/decorators.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
[**s**\|\ **S**]][**+l**\|\ **r**][**+p**\ *percent*].
3030
Features with an area smaller than *min_area* in km\ :sup:`2` or of
3131
hierarchical level that is lower than *min_level* or higher than
32-
*max_level* will not be plotted [Default is 0/0/4 (all
32+
*max_level* will not be plotted [Default is ``"0/0/4"`` (all
3333
features)].""",
3434
"frame": r"""
3535
frame : bool or str or list
@@ -305,13 +305,13 @@
305305
[**x**\|\ **y**\|\ **z**]\ *azim*\[/*elev*\[/*zlevel*]]\
306306
[**+w**\ *lon0*/*lat0*\[/*z0*]][**+v**\ *x0*/*y0*].
307307
Select perspective view and set the azimuth and elevation angle of
308-
the viewpoint. Default is [180, 90]. Full documentation is at
308+
the viewpoint [Default is ``[180, 90]``]. Full documentation is at
309309
:gmt-docs:`gmt.html#perspective-full`.
310310
""",
311311
"registration": r"""
312312
registration : str
313313
**g**\|\ **p**.
314-
Force gridline (**g**) or pixel (**p**) node registration.
314+
Force gridline (**g**) or pixel (**p**) node registration
315315
[Default is **g**\ (ridline)].
316316
""",
317317
"skiprows": r"""
@@ -333,7 +333,7 @@
333333
"transparency": r"""
334334
transparency : int or float
335335
Set transparency level, in [0-100] percent range
336-
[Default is 0, i.e., opaque].
336+
[Default is ``0``, i.e., opaque].
337337
Only visible when PDF or raster format output is selected.
338338
Only the PNG format selection adds a transparency layer
339339
in the image (for further processing). """,

pygmt/src/basemap.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,11 +54,11 @@ def basemap(self, **kwargs):
5454
map_scale : str
5555
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
5656
**+w**\ *length*.
57-
Draws a simple map scale centered on the reference point specified.
57+
Draw a simple map scale centered on the reference point specified.
5858
box : bool or str
5959
[**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
6060
[**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
61-
If set to ``True``, draws a rectangular border around the
61+
If set to ``True``, draw a rectangular border around the
6262
map scale or rose. Alternatively, specify a different pen with
6363
**+p**\ *pen*. Add **+g**\ *fill* to fill the scale panel [Default is
6464
no fill]. Append **+c**\ *clearance* where *clearance* is either gap,
@@ -71,14 +71,14 @@ def basemap(self, **kwargs):
7171
radius. You can override this radius by appending another value.
7272
Finally, append **+s** to draw an offset background shaded region.
7373
Here, *dx/dy* indicates the shift relative to the foreground frame
74-
[Default is 4p/-4p] and shade sets the fill style to use for shading
75-
[Default is gray50].
74+
[Default is ``"4p/-4p"``] and shade sets the fill style to use for
75+
shading [Default is ``"gray50"``].
7676
rose : str
77-
Draws a map directional rose on the map at the location defined by
77+
Draw a map directional rose on the map at the location defined by
7878
the reference and anchor points.
7979
compass : str
80-
Draws a map magnetic rose on the map at the location defined by the
81-
reference and anchor points
80+
Draw a map magnetic rose on the map at the location defined by the
81+
reference and anchor points.
8282
{verbose}
8383
{panel}
8484
{coltypes}

pygmt/src/binstats.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ def binstats(data, **kwargs):
8484
Normalize the resulting grid values by the area represented by the
8585
search *radius* [no normalization].
8686
search_radius : float or str
87-
Sets the *search_radius* that determines which data points are
87+
Set the *search_radius* that determines which data points are
8888
considered close to a node. Append the distance unit.
8989
Not compatible with ``tiling``.
9090
weight : str

pygmt/src/coast.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def coast(self, **kwargs):
7676
strings in a list.
7777
resolution : str
7878
**f**\|\ **h**\|\ **i**\|\ **l**\|\ **c**.
79-
Selects the resolution of the data set to: (**f**\ )ull,
79+
Select the resolution of the data set to: (**f**\ )ull,
8080
(**h**\ )igh, (**i**\ )ntermediate, (**l**\ )ow,
8181
and (**c**\ )rude.
8282
land : str
@@ -127,7 +127,7 @@ def coast(self, **kwargs):
127127
map_scale : str
128128
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
129129
**+w**\ *length*.
130-
Draws a simple map scale centered on the reference point specified.
130+
Draw a simple map scale centered on the reference point specified.
131131
borders : int or str or list
132132
*border*\ [/*pen*].
133133
Draw political boundaries. Specify the type of boundary and

pygmt/src/colorbar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def colorbar(self, **kwargs):
5454
[**+h**\|\ **v**][**+j**\ *justify*]\
5555
[**+m**\ [**a**\|\ **c**\|\ **l**\|\ **u**]]\
5656
[**+n**\ [*txt*]][**+o**\ *dx*\ [/*dy*]].
57-
Defines the reference point on the map for the color scale using one of
57+
Define the reference point on the map for the color scale using one of
5858
four coordinate systems: (1) Use **g** for map (user) coordinates, (2)
5959
use **j** or **J** for setting *refpoint* via a 2-character
6060
justification code that refers to the (invisible) map domain rectangle,
@@ -71,7 +71,7 @@ def colorbar(self, **kwargs):
7171
box : bool or str
7272
[**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
7373
[**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
74-
If set to ``True``, draws a rectangular border around the color scale.
74+
If set to ``True``, draw a rectangular border around the color scale.
7575
Alternatively, specify a different pen with **+p**\ *pen*. Add
7676
**+g**\ *fill* to fill the scale panel [Default is no fill]. Append
7777
**+c**\ *clearance* where *clearance* is either gap, xgap/ygap, or

pygmt/src/contour.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,13 @@ def contour(self, data=None, x=None, y=None, z=None, **kwargs):
8383
I : bool
8484
Color the triangles using CPT.
8585
triangular_mesh_pen : str
86-
Pen to draw the underlying triangulation [Default is None].
86+
Pen to draw the underlying triangulation [Default is ``None``].
8787
no_clip : bool
88-
Do NOT clip contours or image at the boundaries [Default will clip
89-
to fit inside region].
88+
Do **not** clip contours or image at the frame boundaries
89+
[Default is ``False`` to fit inside ``region``].
9090
Q : float or str
9191
[*cut*][**+z**].
92-
Do not draw contours with less than cut number of points.
92+
Do not draw contours with less than *cut* number of points.
9393
skip : bool or str
9494
[**p**\|\ **t**].
9595
Skip input points outside region.

pygmt/src/dimfilter.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def dimfilter(grid, **kwargs):
7777
calculation.
7878
filter : str
7979
**x**\ *width*\ [**+l**\|\ **u**].
80-
Sets the primary filter type. Choose among convolution and
80+
Set the primary filter type. Choose among convolution and
8181
non-convolution filters. Use the filter code **x** followed by
8282
the full diameter *width*. Available convolution filters are:
8383
@@ -94,7 +94,7 @@ def dimfilter(grid, **kwargs):
9494
to return the smallest or largest of each sector's modal values.
9595
sectors : str
9696
**x**\ *sectors*\ [**+l**\|\ **u**]
97-
Sets the secondary filter type **x** and the number of bow-tie sectors.
97+
Set the secondary filter type **x** and the number of bow-tie sectors.
9898
*sectors* must be integer and larger than 0. When *sectors* is
9999
set to 1, the secondary filter is not effective. Available secondary
100100
filters **x** are:
@@ -108,14 +108,14 @@ def dimfilter(grid, **kwargs):
108108
value. Append **+l** or **+h** to the sectors if you rather want to
109109
return the smallest or largest of the modal values.
110110
spacing : str or list
111-
*x_inc* [and optionally *y_inc*] is the output Increment. Append
111+
*x_inc* [and optionally *y_inc*] is the output increment. Append
112112
**m** to indicate minutes, or **c** to indicate seconds. If the new
113113
*x_inc*, *y_inc* are NOT integer multiples of the old ones (in the
114-
input data), filtering will be considerably slower. [Default: Same
114+
input data), filtering will be considerably slower. [Default is same
115115
as input.]
116116
region : str or list
117117
[*xmin*, *xmax*, *ymin*, *ymax*].
118-
Defines the region of the output points. [Default: Same as input.]
118+
Define the region of the output points [Default is same as input].
119119
{verbose}
120120
121121
Returns

pygmt/src/filter1d.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ def filter1d(data, output_type="pandas", outfile=None, **kwargs):
3535
----------
3636
filter_type : str
3737
**type**\ *width*\ [**+h**].
38-
Sets the filter **type**. Choose among convolution and non-convolution
38+
Set the filter **type**. Choose among convolution and non-convolution
3939
filters. Append the filter code followed by the full filter
4040
*width* in same units as time column. By default, this
4141
performs a low-pass filtering; append **+h** to select high-pass
@@ -82,9 +82,9 @@ def filter1d(data, output_type="pandas", outfile=None, **kwargs):
8282
half the filter-width of data at each end.
8383
8484
time_col : int
85-
Indicates which column contains the independent variable (time). The
85+
Indicate which column contains the independent variable (time). The
8686
left-most column is 0, while the right-most is (*n_cols* - 1)
87-
[Default is 0].
87+
[Default is ``0``].
8888
8989
output_type : str
9090
Determine the format the xyz data will be returned in [Default is

pygmt/src/grd2cpt.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,11 +78,11 @@ def grd2cpt(grid, **kwargs):
7878
grid : str or xarray.DataArray
7979
The file name of the input grid or the grid loaded as a DataArray.
8080
transparency : int or float or str
81-
Sets a constant level of transparency (0-100) for all color slices.
81+
Set a constant level of transparency (0-100) for all color slices.
8282
Append **+a** to also affect the foreground, background, and NaN
83-
colors [Default is no transparency, i.e., 0 (opaque)].
83+
colors [Default is no transparency, i.e., ``0`` (opaque)].
8484
cmap : str
85-
Selects the master color palette table (CPT) to use in the
85+
Select the master color palette table (CPT) to use in the
8686
interpolation. Full list of built-in color palette tables can be found
8787
at :gmt-docs:`cookbook/cpts.html#built-in-color-palette-tables-cpt`.
8888
background : bool or str
@@ -111,10 +111,10 @@ def grd2cpt(grid, **kwargs):
111111
to resample the color table into *nlevels* equidistant slices.
112112
series : list or str
113113
[*min/max/inc*\ [**+b**\|\ **l**\|\ **n**\]|\ *file*\|\ *list*\].
114-
Defines the range of the new CPT by giving the lowest and highest
114+
Define the range of the new CPT by giving the lowest and highest
115115
z-value (and optionally an interval). If this is not given, the
116116
existing range in the master CPT will be used intact. The values
117-
produced defines the color slice boundaries. If **+n** is used it
117+
produced defines the color slice boundaries. If **+n** is used it
118118
refers to the number of such boundaries and not the number of slices.
119119
For details on array creation, see
120120
:gmt-docs:`makecpt.html#generate-1d-array`.

0 commit comments

Comments
 (0)