Skip to content
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

Figure.grdview, Figure.grdimage: Add alias "no_interpolation" for "-T" #3355

Draft
wants to merge 3 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
9 changes: 9 additions & 0 deletions pygmt/src/grdimage.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
N="no_clip",
Q="nan_transparent",
R="region",
T="no_interpolation",
V="verbose",
n="interpolation",
c="panel",
Expand Down Expand Up @@ -132,6 +133,14 @@ def grdimage(self, grid, **kwargs):
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"``].
no_interpolation : bool or str
[**+o**\ [*pen*\ ]][**+s**].
Plot without any interpolation. This involves converting each node-
centered bin into a polygon which is then painted separately. Append **+s**
to skip nodes with z = NaN. This option is suitable for categorical data
where interpolating between values is meaningless and a categorical CPT
has been provided via ``cmap``. Append **+o** to draw the tile outlines,
and specify a custom pen.
{region}
{verbose}
{panel}
Expand Down
10 changes: 10 additions & 0 deletions pygmt/src/grdview.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
Wm="meshpen",
Wf="facadepen",
I="shading",
T="no_interpolation",
V="verbose",
c="panel",
f="coltypes",
Expand Down Expand Up @@ -103,6 +104,15 @@ def grdview(self, grid, **kwargs):
specify azimuth, intensity, and ambient arguments for that function,
or just give **+d** to select the default arguments
[Default is **+a**\ -45\ **+nt**\ 1\ **+m**\ 0].
no_interpolation : bool or str
[**+o**\ [*pen*\ ]][**+s**].
Plot without any interpolation. This involves converting each node-
centered bin into a polygon which is then painted separately. Append **+s**
to skip nodes with z = NaN. This option is suitable for categorical data
where interpolating between values is meaningless and a categorical CPT
has been provided via ``cmap``. Append **+o** to draw the tile outlines,
and specify a custom pen. As this option produces a flat surface it cannot
be combined with ``zscale`` or ``zsize``.
{verbose}
{panel}
{coltypes}
Expand Down