Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: Use plural for units for the other quantities #2278

Merged
merged 48 commits into from Jan 4, 2023
Merged
Show file tree
Hide file tree
Changes from 38 commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
a6b6323
Use plural for units in 'grdproject.py'
yvonnefroehlich Dec 26, 2022
164d500
Use plural for units in 'grdtrack.py'
yvonnefroehlich Dec 26, 2022
3cfa815
Use plural for units in 'inset.py'
yvonnefroehlich Dec 26, 2022
a40e7ab
Use plural for units in 'sphdistance.py'
yvonnefroehlich Dec 26, 2022
34014fa
Use plural for units in 'x2sys_init.py'
yvonnefroehlich Dec 26, 2022
15607ba
Use plural for units in 'grdview_surface.py'
yvonnefroehlich Dec 26, 2022
e5d5423
Use plural for units in 'points_categorical.py'
yvonnefroehlich Dec 26, 2022
8461a72
Use plural for units in 'scatter3d.py'
yvonnefroehlich Dec 26, 2022
1363dd9
Use plural for units in 'vectors.py'
yvonnefroehlich Dec 26, 2022
1cdd915
Use plural for units in 'first_figure.py'
yvonnefroehlich Dec 26, 2022
9113543
Use plural for units in 'rose.py'
yvonnefroehlich Dec 26, 2022
3032b60
Fix line length in 'first_figure.py'
yvonnefroehlich Dec 26, 2022
2e2d671
Use plural for units in 'wiggle.py'
yvonnefroehlich Dec 26, 2022
eae85a3
Use plural for units in 'grdproject.py'
yvonnefroehlich Dec 26, 2022
0c08a44
Use plural for units in 'text.py'
yvonnefroehlich Dec 26, 2022
e5423a8
Fix line length in 'wiggle.py'
yvonnefroehlich Dec 26, 2022
bad5e39
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 26, 2022
155a23a
Improve highlighting in 'inset.py'
yvonnefroehlich Dec 26, 2022
e096b6b
Fix typo in 'inset.py'
yvonnefroehlich Dec 26, 2022
2dde65d
Fix typo (own) and improve formulation in 'first_figure.py'
yvonnefroehlich Dec 26, 2022
84bf2e9
Use plural for units in 'blockm.py'
yvonnefroehlich Dec 26, 2022
781cb04
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 26, 2022
3c984ed
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 26, 2022
6b817f3
Improve formulation in 'first_figure.py'
yvonnefroehlich Dec 26, 2022
76171ba
Use plural for units in 'rose.py'
yvonnefroehlich Dec 26, 2022
28d2914
Specific unit in 'blockm.py' (code review)
yvonnefroehlich Dec 27, 2022
02f29e0
Use plural for units in 'plot.yp'
yvonnefroehlich Dec 27, 2022
d07ef99
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 27, 2022
fef0f10
Reverse double plural
yvonnefroehlich Dec 27, 2022
3fb23ae
Use singlar for fraction of one inch
yvonnefroehlich Dec 27, 2022
e1e402e
Use long form of character in docs 'colorbar.py'
yvonnefroehlich Dec 27, 2022
2d09a2a
Use long form of character in docs 'inset.py'
yvonnefroehlich Dec 27, 2022
d4f4624
Use long form of character in example 'colorbar.py'
yvonnefroehlich Dec 27, 2022
2be57fc
Improve formulation in 'blockm.py' (code review)
yvonnefroehlich Dec 27, 2022
fecf83a
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 28, 2022
c8560ad
Revert changes in 'first_figure.py'
yvonnefroehlich Dec 28, 2022
822e23e
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 28, 2022
fe527be
Use plural for units in '01_first_figure.py'
yvonnefroehlich Dec 28, 2022
5deaa1d
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 29, 2022
9053380
Do not use plural within several nouns in 'rose.py'
yvonnefroehlich Dec 29, 2022
2f5a016
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 29, 2022
b8f2103
Use abbreviations for velocity units in 'x2sys_init.py'
yvonnefroehlich Dec 29, 2022
995a492
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 30, 2022
98f49c5
Merge branch 'main' into fix-typos-14
yvonnefroehlich Dec 31, 2022
43dc4c5
Merge branch 'main' into fix-typos-14
yvonnefroehlich Jan 2, 2023
d4d306a
Merge branch 'main' into fix-typos-14
yvonnefroehlich Jan 2, 2023
a786e15
Merge branch 'main' into fix-typos-14
yvonnefroehlich Jan 3, 2023
ea9fe1e
Merge branch 'main' into fix-typos-14
yvonnefroehlich Jan 4, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/gallery/3d_plots/grdview_surface.py
Expand Up @@ -39,7 +39,7 @@ def ackley(x, y):
fig = pygmt.Figure()

# Plot grid as a 3-D surface
SCALE = 0.5 # in centimeter
SCALE = 0.5 # in centimeters
fig.grdview(
data,
frame=["a5f1", "za5f1"],
Expand Down
6 changes: 3 additions & 3 deletions examples/gallery/3d_plots/scatter3d.py
Expand Up @@ -61,15 +61,15 @@
)

fig.plot3d(
# Use petal width, sepal length and petal length as x, y and z data input,
# respectively
# Use petal width, sepal length, and petal length as x, y, and z
# data input, respectively
x=df.petal_width,
y=df.sepal_length,
z=df.petal_length,
# Vary each symbol size according to another feature (sepal width, scaled
# by 0.1)
size=0.1 * df.sepal_width,
# Use 3-D cubes ("u") as symbols, with size in centimeter units ("c")
# Use 3-D cubes ("u") as symbols with size in centimeters ("c")
style="uc",
# Points colored by categorical number code
fill=df.species.cat.codes.astype(int),
Expand Down
2 changes: 1 addition & 1 deletion examples/gallery/embellishments/colorbar.py
Expand Up @@ -8,7 +8,7 @@
can be found at :gmt-docs:`cookbook/cpts.html`. You can set the ``position`` of
the colorbar using the following options:

- **j/J**: justified inside/outside the map frame using any 2 character
- **j/J**: justified inside/outside the map frame using any 2-character
combination of vertical (**T**\ op, **M**\ iddle, **B**\ ottom) and
horizontal (**L**\ eft, **C**\ enter, **R**\ ight) alignment codes, e.g.
``position="jTR"`` for top right.
Expand Down
10 changes: 5 additions & 5 deletions examples/gallery/histograms/blockm.py
Expand Up @@ -16,13 +16,13 @@

# Set the region for the plot
region = [130, 152.5, 32.5, 52.5]
# Define spacing in x and y direction (150 by 150 minute blocks)
# Define spacing in x and y direction (150x150 arc-minute blocks)
spacing = "150m"

fig = pygmt.Figure()

# Calculate mean depth in km from all events within 150x150 minute
# bins using blockmean
# Calculate mean depth in kilometers from all events within
# 150x150 arc-minute bins using blockmean
df = pygmt.blockmean(data=data, region=region, spacing=spacing)
# Convert to grid
grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing)
Expand All @@ -41,8 +41,8 @@

fig.shift_origin(xshift="w+5c")

# Calculate number of total locations within 150x150 minute bins via
# blockmean's summary parameter
# Calculate number of total locations within 150x150 arc-minute bins
# with blockmean's summary parameter
df = pygmt.blockmean(data=data, region=region, spacing=spacing, summary="n")
grd = pygmt.xyz2grd(data=df, region=region, spacing=spacing)

Expand Down
3 changes: 2 additions & 1 deletion examples/gallery/symbols/points_categorical.py
Expand Up @@ -81,7 +81,8 @@
cmap=True,
# Do not clip symbols that fall close to the map bounds
no_clip=True,
# Use circles as symbols with size in centimeter units
# Use circles as symbols (the first "c") with diameter in
# centimeters (the second "c")
style="cc",
# Set transparency level for all symbols to deal with overplotting
transparency=40,
Expand Down
4 changes: 2 additions & 2 deletions examples/get_started/01_first_figure.py
Expand Up @@ -179,5 +179,5 @@
# 4. Create a global map. Set the region to "d" to center the map at the Prime
# Meridian or "g" to center the map at the International Date Line. When the
# region is set without using a list full of integers or floating numbers,
# the argument needs to be passed as a Python string. Create a 15 centimeter
# map using the Mollwide ("W") projection.
# the argument needs to be passed as a Python string. Create a map with a
# width of 15 centimeters using the Mollwide ("W") projection.
2 changes: 1 addition & 1 deletion examples/tutorials/advanced/vectors.py
Expand Up @@ -92,7 +92,7 @@
pen="2p",
fill="red3",
)
# Vector 2 after changing default unit to inch
# Vector 2 after changing default unit to inches
with pygmt.config(PROJ_LENGTH_UNIT="i"):
fig.plot(
x=2,
Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/basics/plot.py
Expand Up @@ -42,8 +42,8 @@
fig.show()

###############################################################################
# We used the style ``c0.3c`` which means "circles of 0.3 centimeter size". The
# ``pen`` parameter controls the outline of the symbols and the ``fill``
# We used the style ``c0.3c`` which means "circles of 0.3 centimeters size".
# The ``pen`` parameter controls the outline of the symbols and the ``fill``
# parameter controls the fill.
#
# We can map the size of the circles to the earthquake magnitude by passing an
Expand All @@ -66,8 +66,8 @@

###############################################################################
# Notice that we didn't include the size in the ``style`` parameter this time,
# just the symbol ``c`` (circles) and the unit ``c`` (centimeter). So in this
# case, the size will be interpreted as being in centimeters.
# just the symbol ``c`` (circles) and the unit ``c`` (centimeters). So in
# this case, the size will be interpreted as being in centimeters.
#
# We can also map the colors of the markers to the depths by passing an array
# to the ``fill`` parameter and providing a colormap name (``cmap``). We can
Expand Down
22 changes: 11 additions & 11 deletions pygmt/src/colorbar.py
Expand Up @@ -54,18 +54,18 @@ def colorbar(self, **kwargs):
[**+n**\ [*txt*]][**+o**\ *dx*\ [/*dy*]].
Defines the reference point on the map for the color scale using one of
four coordinate systems: (1) Use **g** for map (user) coordinates, (2)
use **j** or **J** for setting *refpoint* via a 2-char justification
code that refers to the (invisible) map domain rectangle, (3) use **n**
for normalized (0-1) coordinates, or (4) use **x** for plot
coordinates (inches, cm, etc.). All but **x** requires both ``region``
and ``projection`` to be specified. Append **+w** followed by the
length and width of the color bar. If width is not specified then it is
set to 4% of the given length. Give a negative length to reverse
the scale bar. Append **+h** to get a horizontal scale
use **j** or **J** for setting *refpoint* via a 2-character
justification code that refers to the (invisible) map domain rectangle,
(3) use **n** for normalized (0-1) coordinates, or (4) use **x** for
plot coordinates (inches, cm, etc.). All but **x** requires both
``region`` and ``projection`` to be specified. Append **+w** followed
by the length and width of the color bar. If width is not specified
then it is set to 4% of the given length. Give a negative length to
reverse the scale bar. Append **+h** to get a horizontal scale
[Default is vertical (**+v**)]. By default, the anchor point on the
scale is assumed to be the bottom left corner (**BL**), but this can be
changed by appending **+j** followed by a 2-char justification code
*justify*.
scale is assumed to be the bottom left corner (**BL**), but this can
be changed by appending **+j** followed by a 2-character
justification code *justify*.
box : bool or str
[**+c**\ *clearances*][**+g**\ *fill*][**+i**\ [[*gap*/]\ *pen*]]\
[**+p**\ [*pen*]][**+r**\ [*radius*]][**+s**\ [[*dx*/*dy*/][*shade*]]].
Expand Down
14 changes: 8 additions & 6 deletions pygmt/src/grdproject.py
Expand Up @@ -79,13 +79,15 @@ def grdproject(grid, **kwargs):
scaling : str
[**c**\|\ **i**\|\ **p**\|\ **e**\|\ **f**\|\
**k**\|\ **M**\|\ **n**\|\ **u**].
Force 1:1 scaling, i.e., output or output data are in actual projected
meters [**e**]. To specify other units, append **f** (foot),
**k** (km), **M** (statute mile), **n** (nautical mile), **u**
(US survey foot), **i** (inch), **c** (cm), or **p** (point).
Force 1:1 scaling, i.e., output or input data are in actual projected
meters [**e**]. To specify other units, append **f** (feet),
**k** (kilometers), **M** (statute miles), **n** (nautical miles),
**u** (US survey feet), **i** (inches), **c** (centimeters), or
**p** (points).
unit : str
Append **c**, **i**, or **p** to indicate that cm, inch, or point
should be the projected measure unit. Cannot be used with ``scaling``.
Append **c**, **i**, or **p** to indicate that centimeters, inches, or
points should be the projected measure unit. Cannot be used with
``scaling``.
{verbose}
{interpolation}
{registration}
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/grdtrack.py
Expand Up @@ -119,8 +119,8 @@ def grdtrack(grid, points=None, newcolname=None, outfile=None, **kwargs):
of the profiles by appending **+l** or **+r**, respectively. Append
suitable units to *length*; it sets the unit used for *ds* [and
*spacing*] (See :gmt-docs:`Units <grdtrack.html#units>`). The default
unit for geographic grids is meter while Cartesian grids implies the
user unit. The output columns will be *lon*, *lat*, *dist*, *azimuth*,
unit for geographic grids is meters while Cartesian grids implies the
user unit. The output columns will be *lon*, *lat*, *dist*, *azimuth*,
*z1*, *z2*, ..., *zn* (The *zi* are the sampled values for each of the
*n* grids).
dfile : str
Expand Down
14 changes: 7 additions & 7 deletions pygmt/src/inset.py
Expand Up @@ -47,10 +47,10 @@ def inset(self, **kwargs):

Append **g**\ *lon*/*lat* for map (user) coordinates,
**j**\ *code* or **J**\ *code* for setting the *refpoint* via a
2-char justification code that refers to the (invisible)
2-character justification code that refers to the (invisible)
projected map bounding box, **n**\ *xn*/*yn* for normalized (0-1)
bounding box coordinates, or **x**\ *x*/*y* for plot
coordinates (inches, cm, points, append unit).
coordinates (inches, centimeters, points, append unit).
All but **x** requires both ``region`` and ``projection`` to be
specified. You can offset the reference point via
**+o**\ *dx*/*dy* in the direction implied by *code* or
Expand All @@ -61,13 +61,13 @@ def inset(self, **kwargs):
coordinates instead are the lower left and upper right corners of
the desired rectangle. (Or, give *xmin/xmax/ymin/ymax* of bounding
rectangle in projected coordinates and optionally
append **+u**\ *unit* [Default coordinate unit is meter (e)].
append **+u**\ *unit* [Default coordinate unit is meters (**e**)].

Append **+w**\ *width*\ [/*height*] of bounding rectangle or box
in plot coordinates (inches, cm, etc.). By default, the anchor
point on the scale is assumed to be the bottom left corner (**BL**),
but this can be changed by appending **+j** followed by a 2-char
justification code *justify*.
in plot coordinates (inches, centimeters, etc.). By default, the
anchor point on the scale is assumed to be the bottom left corner
(**BL**), but this can be changed by appending **+j** followed by
a 2-character justification code *justify*.
**Note**: If **j** is used then *justify* defaults to the same
as *refpoint*, if **J** is used then *justify* defaults to the
mirror opposite of *refpoint*. Specify inset box attributes via
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/rose.py
Expand Up @@ -80,7 +80,7 @@ def rose(self, data=None, length=None, azimuth=None, **kwargs):

orientation : bool
Specifies that the input data are orientation data (i.e., have a
180 degree ambiguity) instead of true 0-360 degree directions
180 degrees ambiguity) instead of true 0-360 degree directions
yvonnefroehlich marked this conversation as resolved.
Show resolved Hide resolved
[Default is 0-360 degrees]. We compensate by counting each record
twice: First as azimuth and second as azimuth +180. Ignored if
``region`` is given as (-90, 90) or (0, 180).
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/sphdistance.py
Expand Up @@ -82,8 +82,8 @@ def sphdistance(data=None, x=None, y=None, **kwargs):
spherical degrees.
unit : str
Specify the unit used for distance calculations. Choose among **d**
(spherical degree), **e** (m), **f** (feet), **k** (km), **M**
(mile), **n** (nautical mile) or **u** survey foot.
(spherical degrees), **e** (meters), **f** (feet), **k** (kilometers),
**M** (miles), **n** (nautical miles), or **u** (survey feet).
node_table : str
Read the information pertaining to each Voronoi
polygon (the unique node lon, lat and polygon area) from a separate
Expand Down
20 changes: 10 additions & 10 deletions pygmt/src/text.py
Expand Up @@ -120,16 +120,16 @@ def text_(
clearance : str
[*dx/dy*][**+to**\|\ **O**\|\ **c**\|\ **C**].
Adjust the clearance between the text and the surrounding box
[Default is 15% of the font size]. Only used if ``pen`` or ``fill`` are
specified. Append the unit you want (*c* for cm, *i* for inch, or *p*
for point; if not given we consult :gmt-term:`PROJ_LENGTH_UNIT`)
or *%* for a percentage of the font size. Optionally, use modifier
**+t** to set the shape of the text box when using ``fill`` and/or
``pen``. Append lower case **o** to get a straight rectangle
[Default is **o**]. Append upper case **O** to get a rounded
rectangle. In paragraph mode (*paragraph*) you can also append lower
case **c** to get a concave rectangle or append upper case **C**
to get a convex rectangle.
[Default is 15% of the font size]. Only used if ``pen`` or ``fill``
are specified. Append the unit you want (*c* for centimeters,
*i* for inches, or *p* for points; if not given we consult
:gmt-term:`PROJ_LENGTH_UNIT`) or *%* for a percentage of the font
size. Optionally, use modifier **+t** to set the shape of the text
box when using ``fill`` and/or ``pen``. Append lower case **o**
to get a straight rectangle [Default is **o**]. Append upper case
**O** to get a rounded rectangle. In paragraph mode (*paragraph*)
you can also append lower case **c** to get a concave rectangle or
append upper case **C** to get a convex rectangle.
fill : str
Sets the shade or color used for filling the text box [Default is
no fill].
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/wiggle.py
Expand Up @@ -68,9 +68,9 @@ def wiggle(
{region}
scale : str or float
Gives anomaly scale in data-units/distance-unit. Append **c**, **i**,
or **p** to indicate the distance unit (cm, inch, or point); if no unit
is given we use the default unit that is controlled by
:gmt-term:`PROJ_LENGTH_UNIT`.
or **p** to indicate the distance unit (centimeters, inches, or
points); if no unit is given we use the default unit that is
controlled by :gmt-term:`PROJ_LENGTH_UNIT`.
{frame}
position : str
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/x2sys_init.py
Expand Up @@ -87,7 +87,7 @@ def x2sys_init(tag, **kwargs):
- **c** - Cartesian userdist or userdist/usertime
- **e** - meters or m/s
- **f** - feet or feet/s
- **k** - km or km/hr
- **k** - kilometers or km/hr
- **m** - miles or miles/hr
yvonnefroehlich marked this conversation as resolved.
Show resolved Hide resolved
- **n** - nautical miles or knots
- **u** - survey feet or survey feet/s
Expand Down