Skip to content

Commit ddef6f4

Browse files
Merge branch 'main' into add-tut-legend-l
2 parents b526839 + 1ee48d1 commit ddef6f4

65 files changed

Lines changed: 796 additions & 377 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/5-bump_gmt_checklist.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ mamba install -c conda-forge gmt=X.Y.Z
3131
- [ ] Run `grep -r "# TODO(GMT.*)" --include="*.py" .` to find TODO items related to GMT
3232
- [ ] Remove related workarounds/patches
3333
- [ ] Fix tests with pytest `xfail`/`skipif` markers that now pass
34+
- [ ] Update URLs to manually inserted images of the GMT documentation
3435
- [ ] Update this checklist if necessary
3536

3637
**To-Do for bumping the minimum required GMT version**:

.github/workflows/benchmarks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ jobs:
8484

8585
# Run the benchmark tests
8686
- name: Run benchmarks
87-
uses: CodSpeedHQ/action@6a8e2b874c338bf81cc5e8be715ada75908d3871 # v4.3.4
87+
uses: CodSpeedHQ/action@346a2d8a8d9d38909abd0bc3d23f773110f076ad # v4.4.1
8888
with:
8989
mode: "instrumentation"
9090
# 'bash -el -c' is needed to use the custom shell.

.github/workflows/ci_tests.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ jobs:
151151
GH_TOKEN: ${{ github.token }}
152152

153153
- name: Install uv
154-
uses: astral-sh/setup-uv@1e862dfacbd1d6d858c55d9b792c756523627244 # v7.1.4
154+
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
155155
with:
156156
activate-environment: true
157157
python-version: ${{ matrix.python-version }}

doc/contributing.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -488,10 +488,10 @@ integration systems will warn us and you can make a new commit with the formatte
488488
Even better, you can just write `/format` in the first line of any comment in a
489489
pull request to lint the code automatically.
490490

491-
When wrapping a new alias, use an underscore to separate words bridged by vowels
492-
(aeiou), such as `no_skip` and `z_only`. Do not use an underscore to separate
493-
words bridged only by consonants, such as `distcalc`, and `crossprofile`. This
494-
convention is not applied by the code checking tools, but the PyGMT maintainers
491+
When introducing a new parameter name, use an underscore to separate words. This improves
492+
readability and aligns with the [PEP 8 style guide](https://peps.python.org/pep-0008/).
493+
For common shortcuts no underscore is needed, e.g., `surftype`, `outgrid`, or `timefmt`.
494+
This convention is not applied by the code checking tools, but the PyGMT maintainers
495495
will comment on any pull requests as needed.
496496

497497
When working on a tutorial or a gallery plot, it is good practice to use code
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
3D Plots
2-
--------
1+
3-D Plots
2+
---------

examples/gallery/basemaps/double_y_axes.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ class can control which axes should be plotted and optionally show annotations,
2020
# %%
2121
import numpy as np
2222
import pygmt
23+
from pygmt.params import Position
2324

2425
# Generate two sample Y-data from one common X-data
2526
x = np.linspace(1.0, 9.0, num=9)
@@ -63,8 +64,7 @@ class can control which axes should be plotted and optionally show annotations,
6364
# Plot points for y2-data
6465
fig.plot(x=x, y=y2, style="s0.28c", fill="red", label="y2")
6566

66-
# Create a legend in the Top Left (TL) corner of the plot with an
67-
# offset of 0.1 centimeters
68-
fig.legend(position="jTL+o0.1c", box=True)
67+
# Create a legend in the Top Left (TL) corner of the plot with a 0.1-cm offset.
68+
fig.legend(position=Position("TL", offset=0.1), box=True)
6969

7070
fig.show()

examples/gallery/basemaps/ternary.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
at the positions listed in the first three columns of the sample dataset
99
``rock_compositions``, with default annotations and gridline spacings, using
1010
the specified labeling defined via ``alabel``, ``blabel``, and ``clabel``.
11-
Points are colored based on the values given in the fourth columns of the
11+
Points are colored based on the values given in the fourth column of the
1212
sample dataset via ``cmap=True``.
1313
"""
1414

examples/gallery/embellishments/gmt_logo.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,12 +7,12 @@
77

88
# %%
99
import pygmt
10+
from pygmt.params import Position
1011

1112
fig = pygmt.Figure()
1213
fig.basemap(region=[0, 10, 0, 2], projection="X6c", frame=True)
1314

1415
# Add the GMT logo in the Top Right (TR) corner of the current plot, scaled up to be 3
1516
# centimeters wide and offset by 0.3 cm in x-direction and 0.6 cm in y-direction.
16-
fig.logo(position="jTR+o0.3c/0.6c+w3c")
17-
17+
fig.logo(position=Position("TR", offset=(0.3, 0.6)), width="3c")
1818
fig.show()

examples/gallery/embellishments/inset.py

Lines changed: 5 additions & 5 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 method is called using a ``with`` statement, and its
7-
``position``, ``box``, ``offset``, and ``margin`` parameters are set. Plotting
8-
methods called within the ``with`` statement are applied to the inset figure.
6+
figure. The method is called using a ``with`` statement, and its ``position``,
7+
``box``, ``offset``, and ``clearance`` parameters are set. Plotting methods
8+
called within the ``with`` statement are applied to the inset figure.
99
"""
1010

1111
# %%
@@ -18,9 +18,9 @@
1818
# adding a frame
1919
fig.coast(region="MG+r2", land="brown", water="lightblue", shorelines="thin", frame="a")
2020
# Create an inset, placing it in the Top Left (TL) corner with a width of 3.5 cm and
21-
# x- and y-offsets of 0.2 cm. The margin is set to 0, and the border is "gold" with a
21+
# x- and y-offsets of 0.2 cm. The clearance is set to 0, and the border is "gold" with a
2222
# pen size of 1.5 points.
23-
with fig.inset(position="jTL+w3.5c+o0.2c", margin=0, box=Box(pen="1.5p,gold")):
23+
with fig.inset(position="jTL+w3.5c+o0.2c", clearance=0, box=Box(pen="1.5p,gold")):
2424
# Create a figure in the inset using coast. This example uses the azimuthal
2525
# orthogonal projection centered at 47E, 20S. The land color is set to
2626
# "gray" and Madagascar is highlighted in "red3".

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 method is called using a ``with`` statement, and its
7-
``position``, ``box``, ``offset``, and ``margin`` can be customized. Plotting
8-
methods called within the ``with`` statement plot into the inset figure.
6+
figure. The method is called using a ``with`` statement, and its ``position``,
7+
``box``, ``offset``, and ``clearance`` can be customized. Plotting methods
8+
called within the ``with`` statement plot into the inset figure.
99
"""
1010

1111
# %%

0 commit comments

Comments
 (0)