Skip to content
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
4 changes: 2 additions & 2 deletions pygmt/src/basemap.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
def basemap(
self,
projection: str | None = None,
zsize: float | str | None = None,
zscale: float | str | None = None,
frame: str | Sequence[str] | bool = False,
zsize: float | str | None = None,
region: Sequence[float | str] | str | None = None,
frame: str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
panel: int | Sequence[int] | bool = False,
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/binstats.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ def binstats(
] = "number",
quantile_value: float = 50,
region: Sequence[float | str] | str | None = None,
registration: Literal["gridline", "pixel"] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
registration: Literal["gridline", "pixel"] | bool = False,
incols: int | str | Sequence[int | str] | None = None,
**kwargs,
) -> xr.DataArray | None:
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/blockm.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ def blockmean( # noqa: PLR0913
outfile: PathLike | None = None,
spacing: Sequence[float | str] | None = None,
region: Sequence[float | str] | str | None = None,
registration: Literal["gridline", "pixel"] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
incols: int | str | Sequence[int | str] | None = None,
outcols: int | str | Sequence[int | str] | None = None,
registration: Literal["gridline", "pixel"] | bool = False,
**kwargs,
) -> pd.DataFrame | np.ndarray | None:
r"""
Expand Down
14 changes: 7 additions & 7 deletions pygmt/src/coast.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ def coast( # noqa: PLR0913
shorelines: bool | str | Sequence[int | str] = False,
box: Box | bool = False,
projection: str | None = None,
frame: str | Sequence[str] | bool = False,
region: Sequence[float | str] | str | None = None,
frame: str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
panel: int | Sequence[int] | bool = False,
transparency: float | None = None,
perspective: float | Sequence[float] | str | bool = False,
transparency: float | None = None,
**kwargs,
):
r"""
Expand Down Expand Up @@ -72,11 +72,7 @@ def coast( # noqa: PLR0913

Parameters
----------
$projection
$region
*Required if this is the first plot command.*
$area_thresh
$frame
lakes : str or list
*fill*\ [**+l**\|\ **+r**].
Set the shade, color, or pattern for lakes and river-lakes. The
Expand Down Expand Up @@ -196,10 +192,14 @@ def coast( # noqa: PLR0913
to any of the continent codes (e.g. ``"=EU"`` for Europe). Append
**+p**\ *pen* to draw polygon outlines [Default is no outline] and
**+g**\ *fill* to fill them [Default is no fill].
$projection
$region
*Required if this is the first plot command.*
$frame
$verbose
$panel
$perspective
$transparency
$verbose

Example
-------
Expand Down
10 changes: 6 additions & 4 deletions pygmt/src/colorbar.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ def colorbar( # noqa: PLR0913
shading: float | Sequence[float] | bool = False,
log: bool = False,
scale: float | None = None,
projection: str | None = None,
box: Box | bool = False,
frame: str | Sequence[str] | bool = False,
projection: str | None = None,
region: Sequence[float | str] | str | None = None,
frame: str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
panel: int | Sequence[int] | bool = False,
Expand Down Expand Up @@ -72,8 +72,6 @@ def colorbar( # noqa: PLR0913

Parameters
----------
frame : str or list
Set colorbar boundary frame, labels, and axes attributes.
$cmap
position : str
[**g**\|\ **j**\|\ **J**\|\ **n**\|\ **x**]\ *refpoint*\
Expand Down Expand Up @@ -138,6 +136,10 @@ def colorbar( # noqa: PLR0913
may be in plot distance units or given as relative fractions and will
be automatically scaled so that the sum of the widths equals the
requested colorbar length.
$projection
$region
frame : str or list
Set colorbar boundary frame, labels, and axes attributes.
$verbose
$panel
$perspective
Expand Down
8 changes: 4 additions & 4 deletions pygmt/src/contour.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def contour( # noqa: PLR0913
z=None,
no_clip: bool = False,
projection: str | None = None,
frame: str | Sequence[str] | bool = False,
region: Sequence[float | str] | str | None = None,
frame: str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
panel: int | Sequence[int] | bool = False,
Expand Down Expand Up @@ -78,8 +78,6 @@ def contour( # noqa: PLR0913
$table_classes.
x/y/z : 1-D arrays
Arrays of x and y coordinates and values z of the data points.
$projection
$region
annotation : float, list, or str
Specify or disable annotated contour levels, modifies annotated
contours specified in ``levels``.
Expand All @@ -90,7 +88,6 @@ def contour( # noqa: PLR0913
- Adjust the appearance by appending different modifiers, e.g.,
``"annot_int+f10p+gred"`` gives annotations with a font size of 10 points and
a red filled box. For all available modifiers see :gmt-docs:`contour.html#a`.
$frame
levels : float, list, or str
Specify the contour lines to generate.

Expand Down Expand Up @@ -139,6 +136,9 @@ def contour( # noqa: PLR0913
to be of the format [*annotcontlabel*][/*contlabel*]. If either
label contains a slash (/) character then use ``|`` as the
separator for the two labels instead.
$projection
$region
$frame
$verbose
$binary
$panel
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/filter1d.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ def filter1d(
Indicate which column contains the independent variable (time). The
left-most column is 0, while the right-most is (*n_cols* - 1)
[Default is ``0``].
$verbose

Returns
-------
Expand Down
1 change: 1 addition & 0 deletions pygmt/src/grd2cpt.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,7 @@ def grd2cpt(
Produce a wrapped (cyclic) color table that endlessly repeats its
range. Note that ``cyclic=True`` cannot be set together with
``categorical=True``.
$region
$verbose

Example
Expand Down
10 changes: 5 additions & 5 deletions pygmt/src/grd2xyz.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,6 @@ def grd2xyz(
**f** to start at 1 (Fortran-style counting). Alternatively, append
**i** to write just the two columns *index* and *z*, where *index*
is the 1-D indexing that GMT uses when referring to grid nodes.
$region
Adding ``region`` will select a subsection of the grid. If this
subsection exceeds the boundaries of the grid, only the common region
will be output.
weight : str
[**a**\ [**+u**\ *unit*]\|\ *weight*].
Write out *x,y,z,w*\ , where *w* is the supplied *weight* (or 1 if not
Expand All @@ -83,7 +79,6 @@ def grd2xyz(
this by appending **+u**\ *unit*. For such grids, the area
varies with latitude and also sees special cases for
gridline-registered layouts at sides, corners, and poles.
$verbose
convention : str
[*flags*].
Write a 1-column ASCII [or binary] table. Output will be organized
Expand Down Expand Up @@ -114,6 +109,11 @@ def grd2xyz(
- **d**: 8-byte floating point double precision

Default format is scanline orientation of ASCII numbers: **TLa**.
$region
Adding ``region`` will select a subsection of the grid. If this
subsection exceeds the boundaries of the grid, only the common region
will be output.
$verbose
$binary
$nodata
$coltypes
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdclip.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ def grdclip(
----------
$grid
$outgrid
$region
above
Pass a sequence of two values in the form of (*high*, *above*), to set all node
values greater than *high* to *above*.
Expand All @@ -81,6 +80,7 @@ def grdclip(
(e.g., list of lists or 2-D numpy array) to replace different old values with
different new values. This is mostly useful when your data are known to be
integer values.
$region
$verbose

Returns
Expand Down
14 changes: 7 additions & 7 deletions pygmt/src/grdcontour.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ def grdcontour(
self,
grid: PathLike | xr.DataArray,
projection: str | None = None,
frame: str | Sequence[str] | bool = False,
region: Sequence[float | str] | str | None = None,
frame: str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
panel: int | Sequence[int] | bool = False,
Expand Down Expand Up @@ -94,16 +94,12 @@ def grdcontour(
Do not draw contours with less than `cut` number of points.
resample : str or int
Resample smoothing factor.
$projection
$region
$frame
label_placement : str
[**d**\|\ **f**\|\ **n**\|\ **l**\|\ **L**\|\ **x**\|\ **X**]\
*args*.
Control the placement of labels along the quoted lines. It supports
five controlling algorithms. See :gmt-docs:`grdcontour.html#g` for
details.
$verbose
pen : str or list
[*type*]\ *pen*\ [**+c**\ [**l**\|\ **f**]].
*type*, if present, can be **a** for annotated contours or **c** for regular
Expand All @@ -114,15 +110,19 @@ def grdcontour(
contour lines are taken from the CPT (see ``levels``). If **+cf** is
appended the colors from the CPT file are applied to the contour annotations.
Select **+c** for both effects.
$panel
$coltypes
label : str
Add a legend entry for the contour being plotted. Normally, the
annotated contour is selected for the legend. You can select the
regular contour instead, or both of them, by considering the label
to be of the format [*annotcontlabel*][/*contlabel*]. If either
label contains a slash (/) character then use ``|`` as the
separator for the two labels instead.
$projection
$region
$frame
$verbose
$panel
$coltypes
$perspective
$transparency

Expand Down
5 changes: 2 additions & 3 deletions pygmt/src/grdcut.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ def grdcut(
or an image, so we need to specify the raster kind explicitly. The default is
``"grid"``.
$outgrid
$projection
$region
extend : bool or float
Allow grid to be extended if new ``region`` exceeds existing
boundaries. Give a value to initialize nodes outside current region.
Expand All @@ -86,7 +84,8 @@ def grdcut(
NaNs, append **+N** to strip off such columns before (optionally)
considering the range of the core subset for further reduction of the
area.

$projection
$region
$verbose
$coltypes

Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdfill.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,8 @@ def grdfill( # noqa: PLR0913
instead. The parameter will be removed in v0.19.0.

$region
$coltypes
$verbose
$coltypes

Returns
-------
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdgradient.py
Original file line number Diff line number Diff line change
Expand Up @@ -136,10 +136,10 @@ def grdgradient(
grid output is not needed for this run then do not specify
``outgrid``. For subsequent runs, just use **r** to read these
values. Using **R** will read then delete the statistics file.
$region
slope_file : str
Name of output grid file with scalar magnitudes of gradient vectors.
Requires ``direction`` but makes ``outgrid`` optional.
$region
$verbose
$coltypes
$interpolation
Expand Down
6 changes: 3 additions & 3 deletions pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ def grdimage( # noqa: PLR0913
monochrome: bool = False,
no_clip: bool = False,
projection: str | None = None,
frame: str | Sequence[str] | bool = False,
region: Sequence[float | str] | str | None = None,
frame: str | Sequence[str] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
panel: int | Sequence[int] | bool = False,
Expand Down Expand Up @@ -89,7 +89,6 @@ def grdimage( # noqa: PLR0913
Parameters
----------
$grid
$frame
$cmap
img_in : str
[**r**].
Expand Down Expand Up @@ -132,7 +131,6 @@ def grdimage( # noqa: PLR0913
suitable modifiers [Default is no illumination]. **Note**: If the
input data represent an *image* then an *intensfile* or constant
*intensity* must be provided.
$projection
monochrome
Force conversion to monochrome image using the (television) YIQ transformation.
Cannot be used with ``nan_transparent``.
Expand All @@ -146,7 +144,9 @@ def grdimage( # noqa: PLR0913
3). If the input is a grid, use **+z** to select another grid value
than NaN. If input is instead an image, append an alternate *color* to
select another pixel value to be transparent [Default is ``"black"``].
$projection
$region
$frame
$verbose
$panel
$coltypes
Expand Down
2 changes: 1 addition & 1 deletion pygmt/src/grdinfo.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def grdinfo(
Parameters
----------
$grid
$region
per_column : str or bool
**n**\|\ **t**.
Format the report using tab-separated fields on a single line. The
Expand Down Expand Up @@ -114,6 +113,7 @@ def grdinfo(
absolute value of the two extremes, append **+s**. We report the
result via the text string *zmin/zmax* or *zmin/zmax/dz*
(if *dz* was given) as expected by :func:`pygmt.makecpt`.
$region
$verbose
$coltypes

Expand Down
4 changes: 2 additions & 2 deletions pygmt/src/grdlandmask.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ def grdlandmask(
"auto", "full", "high", "intermediate", "low", "crude", None
] = None,
region: Sequence[float | str] | str | None = None,
registration: Literal["gridline", "pixel"] | bool = False,
verbose: Literal["quiet", "error", "warning", "timing", "info", "compat", "debug"]
| bool = False,
registration: Literal["gridline", "pixel"] | bool = False,
cores: int | bool = False,
**kwargs,
) -> xr.DataArray | None:
Expand Down Expand Up @@ -61,7 +61,6 @@ def grdlandmask(
----------
$outgrid
$spacing
$region
$area_thresh
resolution
Select the resolution of the coastline dataset to use. The available resolutions
Expand Down Expand Up @@ -95,6 +94,7 @@ def grdlandmask(

Values can be any number, or one of ``None``, ``"NaN"``, and ``np.nan`` for
setting nodes to NaN.
$region
$verbose
$registration
$cores
Expand Down
Loading