Skip to content

Commit 38f4d1f

Browse files
michaelgrundMeghan Jonesseismancore-man
authored
Apply NIST SI unit convention to some gallery examples (#1194)
Co-authored-by: Meghan Jones <[email protected]> Co-authored-by: Dongdong Tian <[email protected]> Co-authored-by: Yao Jiayuan <[email protected]>
1 parent 4fa00f1 commit 38f4d1f

File tree

9 files changed

+19
-19
lines changed

9 files changed

+19
-19
lines changed

examples/gallery/embellishments/colorbar.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
right.
1515
- **g**: using map coordinates, e.g. ``position="g170/-45"`` for longitude 170E,
1616
latitude 45S.
17-
- **x**: using paper coordinates, e.g. ``position="x5c/7c"`` for 5cm,7cm from anchor
17+
- **x**: using paper coordinates, e.g. ``position="x5c/7c"`` for 5 cm,7 cm from anchor
1818
point.
1919
- **n**: using normalized (0-1) coordinates, e.g. ``position="n0.4/0.8"``.
2020
@@ -34,7 +34,7 @@
3434
fig.colorbar(
3535
cmap="batlow",
3636
# Colorbar positioned at map coordinates (g) longitude/latitude 0.3/8.7,
37-
# with a length/width (+w) of 4cm by 0.5cm, and plotted horizontally (+h)
37+
# with a length/width (+w) of 4 cm by 0.5 cm, and plotted horizontally (+h)
3838
position="g0.3/8.7+w4c/0.5c+h",
3939
box=True,
4040
frame=["x+lTemperature", r"y+l\260C"],
@@ -45,8 +45,8 @@
4545
fig.colorbar(
4646
cmap="oleron",
4747
# Colorbar position justified outside map frame (J) at Middle Right (MR),
48-
# offset (+o) by 1cm horizontally and 0cm vertically from anchor point,
49-
# with a length/width (+w) of 7cm by 0.5cm and a box for NaN values (+n)
48+
# offset (+o) by 1 cm horizontally and 0 cm vertically from anchor point,
49+
# with a length/width (+w) of 7 cm by 0.5 cm and a box for NaN values (+n)
5050
position="JMR+o1c/0c+w7c/0.5c+n+mc",
5151
# Note that the label 'Elevation' is moved to the opposite side and plotted
5252
# vertically as a column of text using '+mc' in the position parameter

examples/gallery/embellishments/inset.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
-----
44
55
The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger
6-
figure. The function is called using a ``with`` statement, and its position,
7-
box, offset, and margin parameters are set. Plotting methods called within the
8-
``with`` statement are applied to the inset figure.
6+
figure. The function is called using a ``with`` statement, and its ``position``,
7+
``box``, ``offset``, and ``margin`` parameters are set. Plotting methods called
8+
within the ``with`` statement are applied to the inset figure.
99
"""
1010
import pygmt
1111

@@ -14,10 +14,10 @@
1414
# "brown", the water to "lightblue", the shorelines width to "thin", and adding a frame
1515
fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a")
1616
# Create an inset, setting the position to top left, the width to 3.5 centimeters, and
17-
# the x- and y-offsets to 0.2 centimeters. The margin is set to 0, and the border is "green".
18-
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+pgreen"):
17+
# the x- and y-offsets to 0.2 centimeters. The margin is set to 0, and the border is "gold".
18+
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box="+pgold"):
1919
# Create a figure in the inset using coast. This example uses the azimuthal
20-
# orthogonal projection centered at 47E, 20S. The land is set to "gray" and
20+
# orthogonal projection centered at 47E, 20S. The land color is set to "gray" and
2121
# Madagascar is highlighted in "red".
2222
fig.coast(
2323
region="g", projection="G47/-20/3.5c", land="gray", water="white", dcw="MG+gred"

examples/gallery/embellishments/inset_rectangle_region.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
--------------------------------------
44
55
The :meth:`pygmt.Figure.inset` method adds an inset figure inside a larger
6-
figure. The function is called using a ``with`` statement, and its position,
7-
box, offset, and margin can be customized. Plotting methods called within the
8-
``with`` statement plot into the inset figure.
6+
figure. The function is called using a ``with`` statement, and its ``position``,
7+
``box``, ``offset``, and ``margin`` can be customized. Plotting methods called
8+
within the ``with`` statement plot into the inset figure.
99
"""
1010

1111
import pygmt

examples/gallery/images/track_sampling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
fig.basemap(region="g", projection="Cyl_stere/150/-20/15c", frame=True)
2828
fig.grdimage(grid=grid, cmap="gray")
2929
fig.coast(land="#666666")
30-
# Plot the sampled bathymetry points using circles (c) of 0.15 cm
30+
# Plot the sampled bathymetry points using circles (c) of 0.15 cm size
3131
# Points are colored using elevation values (normalized for visual purposes)
3232
fig.plot(
3333
x=track.longitude,

examples/gallery/lines/line_custom_cpt.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
import numpy as np
1616
import pygmt
1717

18-
# Create a list of values between 20 and 30 with at 0.2 intervals
18+
# Create a list of values between 20 and 30 with 0.2 intervals
1919
x = np.arange(start=20, stop=30, step=0.2)
2020

2121
fig = pygmt.Figure()

examples/gallery/lines/linestyles.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"1p,lightblue,-.", # dash-dotted line
3939
"2p,blue,..-", # dot-dot-dashed line
4040
"2p,tomato,--.", # dash-dash-dotted line
41-
# A pattern of 4-point-long line segment and 2-point-gap between segment,
41+
# A pattern of 4-point-long line segments and 2-point-long gaps between segments,
4242
# with pattern offset by 2 points from the origin
4343
"2p,tomato,4_2:2p",
4444
]:

examples/gallery/lines/vector_heads_tails.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
In the following we use the :meth:`pygmt.Figure.plot` method to plot vectors
2727
with individual heads and tails. We must specify the modifiers (together with
2828
the vector type, here ``v``, see also
29-
:doc:`Vector types documentation </gallery/lines/vectors>`)
29+
:doc:`Vector types documentation </gallery/lines/vector_styles>`)
3030
by passing the corresponding shortcuts to the ``style`` parameter.
3131
3232
"""

examples/gallery/symbols/points.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
y = np.random.uniform(region[2], region[3], 100)
1616

1717
fig = pygmt.Figure()
18-
# Create a 15x15 cm basemap with a Cartesian projection (X) using the data region
18+
# Create a 15 cm x 15 cm basemap with a Cartesian projection (X) using the data region
1919
fig.basemap(region=region, projection="X15c", frame=True)
20-
# Plot using triangles (i) of 0.5 cm
20+
# Plot using inverted triangles (i) of 0.5 cm size
2121
fig.plot(x, y, style="i0.5c", color="black")
2222
fig.show()

0 commit comments

Comments
 (0)