Repository navigation
Closed
Labels
feature requestNew feature wanted
Milestone
Description
This issue serves as the central place for discussing and tracking the implementation of the grdview method in PyGMT. The issue will be closed when the initial implementation is complete. Progress is tracked at PyGMT: Wrapping GMT modules.
Documentation
- GMT: https://docs.generic-mapping-tools.org/dev/grdview.html
- GMT.jl: https://www.generic-mapping-tools.org/GMTjl_doc/documentation/modules/grdview
- PyGMT: https://www.pygmt.org/dev/api/generated/pygmt.Figure.grdview.html
GMT Option Flags and Modifieres
☑️: Implemented; ⬜: To be implemented/discussed; Strikethrough: Won't implement.
-
ingrid:grid -
-R:region -
-J:projection -
-Jz:zscale/zsize -
-B:frame -
-C:cmapFigure.grdview: Migrate cmap alias to the new alias system #4443 -
-G:drape_gridFigure.grdview: Migrate the 'drapegrid' parameter to the new alias system #4442 -
-I -
-N:plane/facade_fillFigure.grdview: Improve parameters plane/facade_fill/facade_pen to set the plane and facade #4235 @seisman -
-Q:surftype/dpi/meshfill/nan_transparent/monochromeFigure.grdview: Add parameters surftype/dpi/mesh_fill/nan_transparent/monochrome to control surface types #4234 @seisman -
-S:smoothFigure.grdview: Add alias "smooth" for the -S option #4444 -
-TFigure.grdview, Figure.grdimage: Add alias "no_interpolation" for "-T" #3355 -
: Use-UFigure.timestampinstead. -
-V: verbose -
-W: -
: Use-X/-YFigure.shift_origininstead. -
-f -
-b -
-p -
-t -
: Use--PAR=valuepygmt.configinstead.
Linked Pull Requests
- Initial feature implementation Wrap grdview #330 @weiji14
- Add a tutorial or gallery example
Related Issues and Discussions
Add links to related wrapper discussions, API design threads, or upstream GMT changes here.
Metadata
Metadata
Assignees
Labels
feature requestNew feature wanted
Type
Projects
- StatusShow more project fieldsNo status
Activity
seisman commentedon Nov 13, 2025
-Qoption is one of the commonly used options ingrdview. Its full syntax is -Qc|i|m[x|y]|s[m][color][+m], with full documentation at https://docs.generic-mapping-tools.org/6.6/grdview.html#q.It will be used in the Figure 3 of the PyGMT paper, so we need to make it Pythonic. Below is an example showing the possible use cases of this option:
The output image is:
So, what is the Pythonic way to specify this option?
surftypecan be used to control the plot type. Its possible values are:"surface": mapped to"s", i.e., surface plot"mesh": mapped to"m", i.e., mesh plot"surface_mesh"/"surface+mesh": mapped to"sm", surface plot with mesh lines on top"waterfallx"/waterfall_x: mapped to"mx", waterfall plot in x direction"waterfally"/waterfall_y: mapped to"my", waterfall plot in y direction"image": mapped to"i", i.e., image plotnan_transparent:surftype="c"is similar to"i"for an image plot, with transparent NaN nodes. So,surftype="image", nan_transparent=Trueis mapped to"c". The parameter namenan_transparentis the same asgrdimage's-Qoption.dpi: Set the dpi for image plot"i"or"c". The parameter name is the same asgrdimage's-Eoptionmeshfill/meshcolor: Set the color (patterns are allowed, so fill makes more sense) for mesh and waterfall plots.monochrome: For the modifier+m. The name is the same asgrdimage's-MoptionAlso see the GMT.jl documentation for reference.
Any comments?