Skip to content

Commit c8fb052

Browse files
authored
Merge branch 'main' into test-old-gmt-versions
2 parents aa5f410 + a555ba7 commit c8fb052

File tree

17 files changed

+34
-29
lines changed

17 files changed

+34
-29
lines changed

README.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@ PyGMT
3131
.. image:: https://zenodo.org/badge/DOI/10.5281/3781524.svg
3232
:alt: Digital Object Identifier for the Zenodo archive
3333
:target: https://doi.org/10.5281/zenodo.3781524
34+
.. image:: https://tinyurl.com/y22nb8up
35+
:alt: PyOpenSci
36+
:target: https://github.com/pyOpenSci/software-review/issues/43
3437
.. image:: https://img.shields.io/github/license/GenericMappingTools/pygmt?style=flat-square
3538
:alt: GitHub license
3639
:target: https://github.com/GenericMappingTools/pygmt/blob/main/LICENSE.txt

doc/contributing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -579,7 +579,7 @@ returning the `pygmt.Figure` object:
579579
def test_my_plotting_case():
580580
"Test that my plotting method works"
581581
fig = Figure()
582-
fig.basemap(region=[0, 360, -90, 90], projection='W7i', frame=True)
582+
fig.basemap(region=[0, 360, -90, 90], projection="W15c", frame=True)
583583
return fig
584584
```
585585

examples/gallery/embellishments/legend.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,17 @@
1010

1111
fig = pygmt.Figure()
1212

13-
fig.basemap(projection="x1i", region=[0, 7, 3, 7], frame=True)
13+
fig.basemap(projection="x2c", region=[0, 7, 3, 7], frame=True)
1414

1515
fig.plot(
1616
data="@Table_5_11.txt",
17-
style="c0.15i",
17+
style="c0.40c",
1818
color="lightgreen",
1919
pen="faint",
2020
label="Apples",
2121
)
2222
fig.plot(data="@Table_5_11.txt", pen="1.5p,gray", label="My lines")
23-
fig.plot(data="@Table_5_11.txt", style="t0.15i", color="orange", label="Oranges")
23+
fig.plot(data="@Table_5_11.txt", style="t0.40c", color="orange", label="Oranges")
2424

2525
fig.legend(position="JTR+jTR+o0.2c", box=True)
2626

examples/gallery/lines/wiggle.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@
2323
x=x,
2424
y=y,
2525
z=z,
26-
# Set anomaly scale to "20c"
26+
# Set anomaly scale to 20 centimeters
2727
scale="20c",
2828
# Fill positive and negative areas red and gray, respectively
2929
color=["red+p", "gray+n"],
30-
# Set the outline width to "1.0p"
30+
# Set the outline width to 1.0 point
3131
pen="1.0p",
3232
# Draw a blue track with a width of 0.5 points
3333
track="0.5p,blue",

examples/tutorials/basics/regions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
###############################################################################
3939
#
4040
# The coordinates can be passed to ``region`` as a list, in the form of
41-
# [*xmin*,\ *xmax*,\ *ymin*,\ *ymax*].
41+
# [*xmin*, *xmax*, *ymin*, *ymax*].
4242

4343
fig = pygmt.Figure()
4444
fig.coast(

pygmt/src/grdcontour.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ def grdcontour(self, grid, **kwargs):
6262
single annotation level +\ *annot_int*
6363
- Disable all annotation with **-**
6464
- Optional label modifiers can be specified as a single string
65-
``'[annot_int]+e'`` or with a list of arguments
66-
``([annot_int], 'e', 'f10p', 'gred')``.
65+
``"[annot_int]+e"`` or with a list of arguments
66+
``([annot_int], "e", "f10p", "gred")``.
6767
limit : str or list of 2 ints
6868
*low*/*high*.
6969
Do no draw contours below `low` or above `high`, specify as string

pygmt/src/grdfilter.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def grdfilter(grid, **kwargs):
9494
4: grid (x,y) in degrees, *width* in km, Spherical distance
9595
calculation.
9696
97-
5: grid (x,y) in Mercator ``projection='m1'`` img units, *width* in km,
97+
5: grid (x,y) in Mercator ``projection="m1"`` img units, *width* in km,
9898
Spherical distance calculation.
9999
100100
{I}

pygmt/src/grdimage.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -108,9 +108,9 @@ def grdimage(self, grid, **kwargs):
108108
image formats you may need to explicitly set ``img_in``, which
109109
specifies that the grid is in fact an image file to be read via
110110
GDAL. Append **r** to assign the region specified by ``region``
111-
to the image. For example, if you have used ``region='d'`` then the
112-
image will be assigned a global domain. This mode allows you to
113-
project a raw image (an image without referencing coordinates).
111+
to the image. For example, if you have used ``region="d"`` then
112+
the image will be assigned a global domain. This mode allows you
113+
to project a raw image (an image without referencing coordinates).
114114
dpi : int
115115
[**i**\|\ *dpi*].
116116
Sets the resolution of the projected grid that will be created if a

pygmt/src/legend.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg
4545
Parameters
4646
----------
4747
spec : None or str
48-
Either ``None`` [default] for using the automatically generated legend
48+
Either ``None`` [Default] for using the automatically generated legend
4949
specification file, or a *filename* pointing to the legend
5050
specification file.
5151
{J}
@@ -55,7 +55,7 @@ def legend(self, spec=None, position="JTR+jTR+o0.2c", box="+gwhite+p1p", **kwarg
5555
**+w**\ *width*\ [/*height*]\ [**+j**\ *justify*]\ [**+l**\ *spacing*]\
5656
[**+o**\ *dx*\ [/*dy*]].
5757
Defines the reference point on the map for the
58-
legend. By default, uses **JTR**\ +\ **jTR**\ +\ **o**\ *0.2c* which
58+
legend. By default, uses **JTR**\ **+jTR**\ **+o**\ 0.2c which
5959
places the legend at the top-right corner inside the map frame, with a
6060
0.2 cm offset.
6161
box : bool or str

pygmt/src/plot.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs):
9090
The size of the data points in units specified using ``style``.
9191
Only valid if using ``x``/``y``.
9292
direction : list of two 1d arrays
93-
If plotting vectors (using ``style='V'`` or ``style='v'``), then
93+
If plotting vectors (using ``style="V"`` or ``style="v"``), then
9494
should be a list of two 1d arrays with the vector directions. These
9595
can be angle and length, azimuth and length, or x and y components,
9696
depending on the style options chosen.
@@ -146,7 +146,7 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs):
146146
incoming segment [Default].
147147
- **r** : Same as **s**, but the group reference point is reset
148148
after each record to the previous point (this method is only
149-
available with the ``connection='r'`` scheme).
149+
available with the ``connection="r"`` scheme).
150150
151151
Instead of the codes **a**\|\ **f**\|\ **s**\|\ **r** you may append
152152
the coordinates of a *refpoint* which will serve as a fixed external
@@ -192,7 +192,7 @@ def plot(self, data=None, x=None, y=None, size=None, direction=None, **kwargs):
192192
color lookup table via ``cmap``. Alternatively, give the name of a
193193
*file* with one z-value (read from the last column) for each
194194
polygon in the input data. To apply it to the fill color, use
195-
``color='+z'``. To apply it to the pen color, append **+z** to
195+
``color="+z"``. To apply it to the pen color, append **+z** to
196196
``pen``.
197197
{a}
198198
{b}

pygmt/src/plot3d.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ def plot3d(
9191
The size of the data points in units specified in ``style``.
9292
Only valid if using ``x``/``y``/``z``.
9393
direction : list of two 1d arrays
94-
If plotting vectors (using ``style='V'`` or ``style='v'``), then
94+
If plotting vectors (using ``style="V"`` or ``style="v"``), then
9595
should be a list of two 1d arrays with the vector directions. These
9696
can be angle and length, azimuth and length, or x and y components,
9797
depending on the style options chosen.
@@ -162,7 +162,7 @@ def plot3d(
162162
color lookup table via ``cmap``. Alternatively, give the name of a
163163
*file* with one z-value (read from the last column) for each
164164
polygon in the input data. To apply it to the fill color, use
165-
``color='+z'``. To apply it to the pen color, append **+z** to
165+
``color="+z"``. To apply it to the pen color, append **+z** to
166166
``pen``.
167167
{a}
168168
{b}

pygmt/src/select.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def select(data=None, outfile=None, **kwargs):
5656
7. inside bins of a grid mask whose nodes are non-zero
5757
5858
The sense of the tests can be reversed for each of these 7 criteria by
59-
using the ``reverse`` option.
59+
using the ``reverse`` parameter.
6060
6161
Full option list at :gmt-docs:`gmtselect.html`
6262

pygmt/src/solar.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def solar(self, terminator="d", terminator_datetime=None, **kwargs):
5656
Color or pattern for filling of terminators.
5757
pen : str
5858
Set pen attributes for lines. The default pen
59-
is ``default,black,solid``.
59+
is ``"0.25p,black,solid"``.
6060
{U}
6161
{V}
6262
{XY}

pygmt/src/velo.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,9 @@ def velo(self, data=None, **kwargs):
7979
confidence ellipse. Use **+f** to set the font and size of the text
8080
[Default is 9p,Helvetica,black]; give **+f**\ 0 to deactivate
8181
labeling. The arrow will be drawn with the pen attributes specified
82-
by the ``pen`` option and the arrow-head can be colored via
82+
by the ``pen`` parameter and the arrow-head can be colored via
8383
``color``. The ellipse will be filled with the color or shade
84-
specified by the ``uncertaintycolor`` option [Default is
84+
specified by the ``uncertaintycolor`` parameter [Default is
8585
transparent], and its outline will be drawn if ``line`` is selected
8686
using the pen selected (by ``pen`` if not given by ``line``).
8787
Parameters are expected to be in the following columns:
@@ -112,9 +112,9 @@ def velo(self, data=None, **kwargs):
112112
confidence ellipse. Use **+f** to set the font and size of the text
113113
[Default is 9p,Helvetica,black]; give **+f**\ 0 to deactivate
114114
labeling. The arrow will be drawn with the pen attributes specified
115-
by the ``pen`` option and the arrow-head can be colored via
115+
by the ``pen`` parameter and the arrow-head can be colored via
116116
``color``. The ellipse will be filled with the color or shade
117-
specified by the ``uncertaintycolor`` option [Default is
117+
specified by the ``uncertaintycolor`` parameter [Default is
118118
transparent], and its outline will be drawn if ``line`` is selected
119119
using the pen selected (by ``pen`` if not given by ``line``).
120120
Parameters are expected to be in the following columns:

pygmt/src/which.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def which(fname, **kwargs):
2525
2626
``fname`` can also be a downloadable file (either a full URL, a
2727
`@file` special file for downloading from the GMT Site Cache, or
28-
`@earth_relief_*` topography grids). In these cases, use option
28+
`@earth_relief_*` topography grids). In these cases, use parameter
2929
``download`` to set the desired behavior. If ``download`` is not used
3030
(or False), the file will not be found.
3131
@@ -53,7 +53,7 @@ def which(fname, **kwargs):
5353
Returns
5454
-------
5555
path : str or list
56-
The path(s) to the file(s), depending on the options used.
56+
The path(s) to the file(s), depending on the parameters used.
5757
5858
Raises
5959
------

pygmt/src/wiggle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ def wiggle(self, data=None, x=None, y=None, z=None, **kwargs):
7777
7878
track : str
7979
Draw track [Default is no track]. Append pen attributes to use
80-
[Default is **0.25p,black,solid**].
80+
[Default is ``"0.25p,black,solid"``].
8181
{U}
8282
{V}
8383
pen : str

setup.cfg

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# An emtpy setup.cfg file for backward compatibility with pip<21.3.
2+
# See https://github.com/GenericMappingTools/pygmt/issues/2100 for the issue report.

0 commit comments

Comments
 (0)