Skip to content

Commit 490d9c4

Browse files
DOC: Update docs to use consistently x-* and y-* (with hyphen) (#3862)
Co-authored-by: Dongdong Tian <seisman.info@gmail.com>
1 parent 6396328 commit 490d9c4

22 files changed

+44
-43
lines changed

examples/gallery/3d_plots/scatter3d.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
zscale=1.5,
9393
)
9494

95-
# Shift the plot origin in x direction temporarily and add the colorbar
95+
# Shift the plot origin in x-direction temporarily and add the colorbar
9696
with fig.shift_origin(xshift=3.1):
9797
fig.colorbar()
9898

examples/gallery/embellishments/gmt_logo.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
fig.basemap(region=[0, 10, 0, 2], projection="X6c", frame=True)
1313

1414
# Add the GMT logo in the Top Right (TR) corner of the current plot, scaled up to be 3
15-
# centimeters wide and offset by 0.3 cm in x direction and 0.6 cm in y direction.
15+
# centimeters wide and offset by 0.3 cm in x-direction and 0.6 cm in y-direction.
1616
fig.logo(position="jTR+o0.3c/0.6c+w3c")
1717

1818
fig.show()

examples/gallery/embellishments/legend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444

4545
# Add a legend to the plot; place it within the plot bounding box with both
4646
# reference ("J") and anchor ("+j") points being the Top Right (TR) corner and an
47-
# offset of 0.2 centimeters in x and y directions; surround the legend with a box
47+
# offset of 0.2 centimeters in x- and y-directions; surround the legend with a box
4848
fig.legend(position="JTR+jTR+o0.2c", box=True)
4949

5050
# -----------------------------------------------------------------------------

examples/gallery/embellishments/scalebar.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
independent) code. Choose from vertical **T**\(op), **M**\(iddle), or
3131
**B**\(ottom) and horizontal **L**\(eft), **C**\(entre), or **R**\(ight).
3232
- offset: **+o**\ *offset* or **+o**\ *xoffset*/\ *yoffset*. Give either a
33-
common shift or individual shifts in x (longitude) and y (latitude)
33+
common shift or individual shifts in x- (longitude) and y- (latitude)
3434
directions.
3535
- height: Use :gmt-term:`MAP_SCALE_HEIGHT` via :func:`pygmt.config`.
3636
- fancy style: **+f**. Get a scale bar that looks like train tracks.
@@ -77,7 +77,7 @@
7777
# -----------------------------------------------------------------------------
7878
# Bottom Right: Add a scale bar valid for a specific location
7979
# It is placed at BottomRight (j) using MiddleRight as anchor point (+j) with
80-
# an offset (+o) of 1 centimeter in both x and y directions
80+
# an offset (+o) of 1 centimeter in both x- and y-directions
8181
# It applies (+c) at -7° South, add a customized label by appending text to +l
8282
fig.basemap(map_scale="jBR+jMR+o1c/1c+c-7+w500k+f+u+lvalid at 7° S")
8383

examples/gallery/embellishments/timestamp.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
The :meth:`pygmt.Figure.timestamp` method can draw the GMT timestamp logo on the plot.
66
The timestamp will always be shown relative to the Bottom Left (BL) corner of the plot.
77
By default, the ``offset`` and ``justify`` parameters are set to ``("-54p", "-54p")``
8-
(x, y directions) and ``"BL"`` (Bottom Left), respectively.
8+
(x-, y-directions) and ``"BL"`` (Bottom Left), respectively.
99
"""
1010

1111
# %%

examples/gallery/histograms/blockm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

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

2424
fig = pygmt.Figure()

examples/gallery/histograms/scatter_and_histograms.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
# level for all circles to deal with overplotting.
4343
fig.plot(x=x, y=y, style="c0.15c", fill=fill, transparency=50)
4444

45-
# Shift the plot origin in y direction temporarily and add top margin histogram.
45+
# Shift the plot origin in y-direction temporarily and add top margin histogram.
4646
with fig.shift_origin(yshift=height + 0.25):
4747
fig.histogram(
4848
projection=f"X{width}/3",
@@ -56,7 +56,7 @@
5656
series=0.2,
5757
)
5858

59-
# Shift the plot origin in x direction temporarily and add right margin histogram.
59+
# Shift the plot origin in x-direction temporarily and add right margin histogram.
6060
with fig.shift_origin(xshift=width + 0.25):
6161
# Plot the horizontal histogram.
6262
fig.histogram(

examples/gallery/images/cross_section.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
# Add a colorbar for the elevation
3939
fig.colorbar(
4040
# Place the colorbar inside the plot (lowercase "j") in the Bottom Right (BR)
41-
# corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x or y
41+
# corner with an offset ("+o") of 0.7 centimeters and 0.3 centimeters in x- or y-
4242
# directions, respectively; move the x label above the horizontal colorbar ("+ml")
4343
position="jBR+o0.7c/0.8c+h+w5c/0.3c+ml",
4444
# Add a box around the colobar with a fill ("+g") in "white" color and a
@@ -61,7 +61,7 @@
6161
x=[126, 146],
6262
y=[42, 40],
6363
text=["A", "B"],
64-
offset="0c/0.2c", # Move text 0.2 centimeters up (y direction)
64+
offset="0c/0.2c", # Move text 0.2 centimeters up (y-direction)
6565
font="15p", # Use a font size of 15 points
6666
)
6767

examples/gallery/images/grdclip.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
fig.grdimage(grid=grid, cmap="oleron")
2929

3030
# Shift plot origin of the second map by "width of the first map + 0.5 cm"
31-
# in x direction
31+
# in x-direction
3232
fig.shift_origin(xshift="w+0.5c")
3333

3434
# Set all grid points < 0 m to a value of -2000 m.

examples/gallery/images/grdgradient.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242

4343
# --------------- plotting the hillshade map -----------
4444

45-
# Shift plot origin of the second map by 12.5 cm in x direction
45+
# Shift plot origin of the second map by 12.5 cm in x-direction
4646
fig.shift_origin(xshift="12.5c")
4747

4848
pygmt.makecpt(cmap="gray", series=[-1.5, 0.3, 0.01])

0 commit comments

Comments
 (0)