Skip to content

DOC: Improve link to the GMT documentation #3944

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

Merged
merged 9 commits into from
May 24, 2025
Merged
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 pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def basemap(self, **kwargs):
At least one of the parameters ``frame``, ``map_scale``, ``rose``, or
``compass`` must be specified if not in subplot mode.

Full option list at :gmt-docs:`basemap.html`
Full GMT docs at :gmt-docs:`basemap.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/binstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ def binstats(
presented as is or may be normalized by the circle area to
perhaps give density estimates.

Full option list at :gmt-docs:`gmtbinstats.html`
Full GMT docs at :gmt-docs:`gmtbinstats.html`.

{aliases}

Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/blockm.py
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ def blockmean(

Must provide either ``data`` or ``x``, ``y``, and ``z``.

Full option list at :gmt-docs:`blockmean.html`
Full GMT docs at :gmt-docs:`blockmean.html`.

{aliases}

Expand Down Expand Up @@ -212,7 +212,7 @@ def blockmedian(

Must provide either ``data`` or ``x``, ``y``, and ``z``.

Full option list at :gmt-docs:`blockmedian.html`
Full GMT docs at :gmt-docs:`blockmedian.html`.

{aliases}

Expand Down Expand Up @@ -310,7 +310,7 @@ def blockmode(

Must provide either ``data`` or ``x``, ``y``, and ``z``.

Full option list at :gmt-docs:`blockmode.html`
Full GMT docs at :gmt-docs:`blockmode.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def coast(self, **kwargs):

A map projection must be supplied.

Full option list at :gmt-docs:`coast.html`
Full GMT docs at :gmt-docs:`coast.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ def colorbar(self, **kwargs):
linear scale, all be equal size, or by providing a file with individual
tile widths.

Full option list at :gmt-docs:`colorbar.html`
Full GMT docs at :gmt-docs:`colorbar.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def contour(

Must provide either ``data`` or ``x``, ``y``, and ``z``.

Full option list at :gmt-docs:`contour.html`
Full GMT docs at :gmt-docs:`contour.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/dimfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def dimfilter(
Thus, an additional filtering (e.g., Gaussian via :func:`pygmt.grdfilter`)
of the DiM-filtered data is generally recommended.

Full option list at :gmt-docs:`dimfilter.html`
Full GMT docs at :gmt-docs:`dimfilter.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/filter1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def filter1d(
Read a table and output as a :class:`numpy.ndarray`,
:class:`pandas.DataFrame`, or ASCII file.

Full option list at :gmt-docs:`filter1d.html`
Full GMT docs at :gmt-docs:`filter1d.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grd2cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def grd2cpt(grid: PathLike | xr.DataArray, **kwargs):
:gmt-docs:`gmt.conf <gmt.conf>` file or the ``color_model`` parameter
will be used.

Full option list at :gmt-docs:`grd2cpt.html`
Full GMT docs at :gmt-docs:`grd2cpt.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grd2xyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def grd2xyz(
Read a grid and output xyz-triplets as a :class:`numpy.ndarray`,
:class:`pandas.DataFrame`, or ASCII file.

Full option list at :gmt-docs:`grd2xyz.html`
Full GMT docs at :gmt-docs:`grd2xyz.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ def grdclip(
values is required, or for reclassification of data values. The values can be any
number or NaN (Not a Number).

Full option list at :gmt-docs:`grdclip.html`
Full GMT docs at :gmt-docs:`grdclip.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def grdcontour(self, grid: PathLike | xr.DataArray, **kwargs):

Takes a grid file name or an :class:`xarray.DataArray` object as input.

Full option list at :gmt-docs:`grdcontour.html`
Full GMT docs at :gmt-docs:`grdcontour.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def grdcut(
to determine the corresponding rectangular ``region`` that will give a grid
that fully covers the oblique domain.

Full option list at :gmt-docs:`grdcut.html`
Full GMT docs at :gmt-docs:`grdcut.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def grdfill(
replace the hole values. If no holes are found the original unchanged grid is
returned.

Full option list at :gmt-docs:`grdfill.html`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note:: admonition stands out a bit too much. Perhaps just reword Full option list at ... to Full GMT docs at ..., similar to @ezevazquez's suggestion at #3881 (comment)?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The note:: admonition stands out a bit too much.

I agree.

Perhaps just reword Full option list at ... to Full GMT docs at ...

I prefer to explicitly mention the name of the GMT module, since the function/method names may differ from the module names. What about the one below?

image

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since the function/method names may differ from the module names

I thought we usually use the same method name as upstream GMT? Different ones I can find are:

The names seem to follow closely enough that we don't need to repeat the name really.

Copy link
Member Author

@seisman seisman May 14, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have methods like hlines/vlines and will have methods like scatter (#3602 ) and choropleth (#2798), which wrap plot. I guess we still need to link to plot in these methods.

Copy link
Member

@weiji14 weiji14 May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have methods like hlines/vlines and will have methods like scatter (#3602 ) and choropleth (#2798), which wrap plot. I guess we still need to link to plot in these methods.

For those convenience methods, then yes, it makes sense to use "Wraps GMT module scatter, with full docs at :gmt-docs:plot.html". But for most other ones, probably ok to use just "Full GMT docs at ..."?

Copy link
Member Author

@seisman seisman May 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I've changed it to "Full GMT docs at ...". Will apply the same changes to other files when getting at least two approvals.

Edit: I've applied the changes to all files.

Full GMT docs at :gmt-docs:`grdfill.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdfilter.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def grdfilter(
half-width of the input edges. If the filter is low-pass, then the output
may be less frequently sampled than the input.

Full option list at :gmt-docs:`grdfilter.html`
Full GMT docs at :gmt-docs:`grdfilter.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdgradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def grdgradient(
Can accept ``azimuth``, ``direction``, and ``radiance`` input to create
the resulting gradient.

Full option list at :gmt-docs:`grdgradient.html`
Full GMT docs at :gmt-docs:`grdgradient.html`.

{aliases}

Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/grdhisteq.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def equalize_grid(
the ``grid``, but the values are changed to reflect their place in the
cumulative distribution.

Full option list at :gmt-docs:`grdhisteq.html`
Full GMT docs at :gmt-docs:`grdhisteq.html`.

{aliases}

Expand Down Expand Up @@ -168,7 +168,7 @@ def compute_bins(
image with :meth:`pygmt.Figure.grdimage` that has all levels of gray
occurring equally.

Full option list at :gmt-docs:`grdhisteq.html`
Full GMT docs at :gmt-docs:`grdhisteq.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def grdimage(self, grid: PathLike | xr.DataArray, **kwargs):
The ``region`` parameter can be used to select a map region larger or
smaller than that implied by the extent of the grid.

Full option list at :gmt-docs:`grdimage.html`
Full GMT docs at :gmt-docs:`grdimage.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def grdinfo(grid: PathLike | xr.DataArray, **kwargs) -> str:

Can read the grid from a file or given as an :class:`xarray.DataArray` grid.

Full option list at :gmt-docs:`grdinfo.html`
Full GMT docs at :gmt-docs:`grdinfo.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdlandmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def grdlandmask(outgrid: PathLike | None = None, **kwargs) -> xr.DataArray | Non
water, or (2) the more detailed (hierarchical) ocean vs land vs lake vs island vs
pond. A mask grid is created with the specified grid spacing.

Full option list at :gmt-docs:`grdlandmask.html`
Full GMT docs at :gmt-docs:`grdlandmask.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdproject.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def grdproject(
set to NaN. The ``region`` parameter can be used to select a map region
large or smaller than that implied by the extent of the grid file.

Full option list at :gmt-docs:`grdproject.html`
Full GMT docs at :gmt-docs:`grdproject.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdsample.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def grdsample(
``translate`` can be used to change the grid registration. When omitted,
the output grid will have the same registration as the input grid.

Full option list at :gmt-docs:`grdsample.html`
Full GMT docs at :gmt-docs:`grdsample.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdtrack.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ def grdtrack(
derivative normal to edge is zero) unless the grid is automatically
recognized as periodic.)

Full option list at :gmt-docs:`grdtrack.html`
Full GMT docs at :gmt-docs:`grdtrack.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdview.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def grdview(self, grid: PathLike | xr.DataArray, **kwargs):
set on top of a surface, plotting of contours on top of the surface, and apply
artificial illumination based on intensities provided in a separate grid file.

Full option list at :gmt-docs:`grdview.html`
Full GMT docs at :gmt-docs:`grdview.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdvolume.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def grdvolume(
(volume/area). Alternatively, a range of contours can be specified to
return the volume and area inside the contour for all contour values.

Full option list at :gmt-docs:`grdvolume.html`
Full GMT docs at :gmt-docs:`grdvolume.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/histogram.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def histogram(self, data: PathLike | TableLike, **kwargs):
r"""
Calculate and plot histograms.

Full option list at :gmt-docs:`histogram.html`
Full GMT docs at :gmt-docs:`histogram.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def image(self, imagefile: PathLike, **kwargs):
Reads an Encapsulated PostScript file or a raster image file and plots
it on a map.

Full option list at :gmt-docs:`image.html`
Full GMT docs at :gmt-docs:`image.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def info(data: PathLike | TableLike, **kwargs) -> np.ndarray | str:
parameter ``nearest_multiple`` will provide a :class:`numpy.ndarray` in the form
of [*zmin*, *zmax*, *dz*] for makecpt.

Full option list at :gmt-docs:`gmtinfo.html`
Full GMT docs at :gmt-docs:`gmtinfo.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/inset.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ def inset(self, **kwargs):
inside of the larger figure. Plotting methods that are called within the
context manager are added to the inset figure.

Full option list at :gmt-docs:`inset.html`
Full GMT docs at :gmt-docs:`inset.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/legend.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def legend(
noted, annotations will be made using the primary annotation font and
size in effect (i.e., :gmt-term:`FONT_ANNOT_PRIMARY`).

Full option list at :gmt-docs:`legend.html`
Full GMT docs at :gmt-docs:`legend.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def logo(self, **kwargs):
Use various options to change this and to place a transparent or
opaque rectangular map panel behind the GMT logo.

Full option list at :gmt-docs:`gmtlogo.html`.
Full GMT docs at :gmt-docs:`gmtlogo.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/makecpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def makecpt(**kwargs):
master CPT, the :gmt-term:`COLOR_MODEL` specified in the
:gmt-docs:`gmt.conf <gmt.conf>` file will be used.

Full option list at :gmt-docs:`makecpt.html`
Full GMT docs at :gmt-docs:`makecpt.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/meca.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def meca( # noqa: PLR0913
- | values in :math:`10 ^ {{exponent}}` dyn cm;
| azimuths and plunges in degrees

Full option list at :gmt-docs:`supplements/seis/meca.html`
Full GMT docs at :gmt-docs:`supplements/seis/meca.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/nearneighbor.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def nearneighbor(

Must provide either ``data`` or ``x``, ``y``, and ``z``.

Full option list at :gmt-docs:`nearneighbor.html`
Full GMT docs at :gmt-docs:`nearneighbor.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/plot.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ def plot( # noqa: PLR0912
polygon outline is drawn or not. If a symbol is selected, ``fill`` and
``pen`` determine the fill and outline/no outline, respectively.

Full option list at :gmt-docs:`plot.html`
Full GMT docs at :gmt-docs:`plot.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/plot3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def plot3d( # noqa: PLR0912
polygon outline is drawn or not. If a symbol is selected, ``fill`` and
``pen`` determine the fill and outline/no outline, respectively.

Full option list at :gmt-docs:`plot3d.html`
Full GMT docs at :gmt-docs:`plot3d.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def project(
back-azimuths or azimuths are better done using :gmt-docs:`mapproject` as
project is strictly spherical.

Full option list at :gmt-docs:`project.html`
Full GMT docs at :gmt-docs:`project.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/psconvert.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ def psconvert(self, **kwargs):
(see :class:`pygmt.Figure`). In this case, an output name must be given
using parameter ``prefix``.

Full option list at :gmt-docs:`psconvert.html`
Full GMT docs at :gmt-docs:`psconvert.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/rose.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def rose(
of the windrose is drawn with the same color as
:gmt-term:`MAP_DEFAULT_PEN`.

Full option list at :gmt-docs:`rose.html`
Full GMT docs at :gmt-docs:`rose.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/select.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def select(
The sense of the tests can be reversed for each of these 7 criteria by
using the ``reverse`` parameter.

Full option list at :gmt-docs:`gmtselect.html`
Full GMT docs at :gmt-docs:`gmtselect.html`.

{aliases}

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/solar.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def solar(
This function plots the day-night terminator. Alternatively, it can plot the
terminators for civil twilight, nautical twilight, or astronomical twilight.

Full option list at :gmt-docs:`solar.html`
Full GMT docs at :gmt-docs:`solar.html`.

{aliases}

Expand Down
Loading
Loading