Skip to content

DOC: Update docs to use consistently x * and y * #3862

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion examples/gallery/lines/envelope.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

The ``close`` parameter of the :meth:`pygmt.Figure.plot` method can be used to build a
symmetrical or an asymmetrical envelope. The user can give either the deviations or the
bounds in y-direction. For the first case append ``"+d"`` or ``"+D"`` and for the latter
bounds in y direction. For the first case append ``"+d"`` or ``"+D"`` and for the latter
case ``"+b"``.
"""

Expand Down
8 changes: 4 additions & 4 deletions examples/tutorials/advanced/cartesian_histograms.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@
# Let ymin and ymax determined automatically by setting both to the same value
region=[0, 200, 0, 0],
projection="X10c", # Cartesian projection with a width of 10 centimeters
# Add frame, annotations ("a"), ticks ("f"), and y-axis label ("+l") "Counts"; the
# Add frame, annotations ("a"), ticks ("f"), and y axis label ("+l") "Counts"; the
# numbers give the steps of annotations and ticks
frame=["WStr", "xaf10", "ya1f1+lCounts"],
data=data01,
Expand All @@ -79,8 +79,8 @@
fill="red3",
pen="1p,darkgray,solid",
histtype=0,
# Use horizontal bars. Note that the x- and y-axis are flipped, with the x-axis
# plotted vertically and the y-axis plotted horizontally.
# Use horizontal bars. Note that the x and y axis are flipped, with the x axis
# plotted vertically and the y axis plotted horizontally.
horizontal=True,
)

Expand Down Expand Up @@ -212,7 +212,7 @@
histtype=0,
# Show cumulative counts
cumulative=True,
# Offset ("+o") the label by 10 points in negative y-direction
# Offset ("+o") the label by 10 points in negative y direction
annotate="+o-10p",
)

Expand Down
4 changes: 2 additions & 2 deletions examples/tutorials/advanced/subplots.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,8 @@
#
# - ``autolabel=True``: Each subplot is automatically labelled 'abcd'.
# - ``margins=["0.1c", "0.2c"]``: Adjusts the space between adjacent subplots.
# In this case, it is set as 0.1 cm in the x-direction and 0.2 cm in the
# y-direction.
# In this case, it is set as 0.1 cm in the x direction and 0.2 cm in the
# y direction.
# - ``title="My Subplot Heading"``: Adds a title on top of the whole figure.
#
# Notice that each subplot was set to use a linear projection ``"X?"``.
Expand Down
8 changes: 4 additions & 4 deletions pygmt/datatypes/header.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ class _GMT_GRID_HEADER(ctp.Structure): # noqa: N801
("z_scale_factor", ctp.c_double),
# After scaling, add this offset
("z_add_offset", ctp.c_double),
# Units in x-directions, in the form "long_name [units]"
# Units in x directions, in the form "long_name [units]"
("x_units", ctp.c_char * GMT_GRID_UNIT_LEN80),
# Units in y-direction, in the form "long_name [units]"
# Units in y direction, in the form "long_name [units]"
("y_units", ctp.c_char * GMT_GRID_UNIT_LEN80),
# Grid value units, in the form "long_name [units]"
("z_units", ctp.c_char * GMT_GRID_UNIT_LEN80),
Expand Down Expand Up @@ -122,9 +122,9 @@ class _GMT_GRID_HEADER(ctp.Structure): # noqa: N801
("type", ctp.c_uint),
# Number of bands [1]. Used with GMT_IMAGE containers
("n_bands", ctp.c_uint),
# Actual x-dimension in memory. mx = n_columns + pad[0] + pad[1]
# Actual x dimension in memory. mx = n_columns + pad[0] + pad[1]
("mx", ctp.c_uint),
# Actual y-dimension in memory. my = n_rows + pad[2] + pad[3]
# Actual y dimension in memory. my = n_rows + pad[2] + pad[3]
("my", ctp.c_uint),
# Paddings on west, east, south, north sides [2,2,2,2]
("pad", ctp.c_uint * 4),
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def basemap(self, **kwargs):
**+p**\ *pen*. Add **+g**\ *fill* to fill the scale panel [Default is
no fill]. Append **+c**\ *clearance* where *clearance* is either gap,
xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform,
separate in x- and y-direction, or individual side spacings between
separate in x and y direction, or individual side spacings between
scale and border. Append **+i** to draw a secondary, inner border as
well. We use a uniform gap between borders of 2p and the
:gmt-term:`MAP_DEFAULTS_PEN` unless other values are specified. Append
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ def coast(self, **kwargs):
**+p**\ *pen*. Add **+g**\ *fill* to fill the scale panel [Default is
no fill]. Append **+c**\ *clearance* where *clearance* is either gap,
xgap/ygap, or lgap/rgap/bgap/tgap where these items are uniform,
separate in x- and y-direction, or individual side spacings between
separate in x and y direction, or individual side spacings between
scale and border. Append **+i** to draw a secondary, inner border as
well. We use a uniform gap between borders of 2p and the
:gmt-term:`MAP_DEFAULTS_PEN` unless other values are specified. Append
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def colorbar(self, **kwargs):
Alternatively, specify a different pen with **+p**\ *pen*. Add
**+g**\ *fill* to fill the scale panel [Default is no fill]. Append
**+c**\ *clearance* where *clearance* is either gap, xgap/ygap, or
lgap/rgap/bgap/tgap where these items are uniform, separate in x- and
y-direction, or individual side spacings between scale and border.
lgap/rgap/bgap/tgap where these items are uniform, separate in x and
y direction, or individual side spacings between scale and border.
Append **+i** to draw a secondary, inner border as well. We use a
uniform gap between borders of 2p and the :gmt-term:`MAP_DEFAULTS_PEN`
unless other values are specified. Append **+r** to draw rounded
Expand Down Expand Up @@ -138,7 +138,7 @@ def colorbar(self, **kwargs):
>>> fig.colorbar(
... # Set cmap to the "roma" CPT
... cmap="roma",
... # Label the x-axis "Velocity" and the y-axis "m/s"
... # Label the x axis "Velocity" and the y axis "m/s"
... frame=["x+lVelocity", "y+lm/s"],
... )
>>> # Show the plot
Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/inset.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ def inset(self, **kwargs):
[Default is no fill].
Append **+c**\ *clearance* where *clearance* is either
*gap*, *xgap*\ /\ *ygap*, or *lgap*\ /\ *rgap*\ /\ *bgap*\ /\
*tgap* where these items are uniform, separate in x- and
y-directions, or individual side spacings between map embellishment
*tgap* where these items are uniform, separate in x and
y directions, or individual side spacings between map embellishment
and border. Append **+i** to draw a secondary, inner border as well.
We use a uniform *gap* between borders of 2p and the default pen
unless other values are specified. Append **+r** to draw rounded
Expand Down