API Reference

Front-Door Dispatcher

InteractiveGMT.iviewFunction
iview(x; kwargs...)

Front-door dispatcher over the Qt + VTK viewers. x may be:

  • a GMTgrid -> view_grid
  • a GMTimage -> view_image (bare image: flat plane, top-down map)
  • a GMTfv -> view_fv (faceted z-colour + matching colorbar; color=:explicit for baked colours)
  • a GMTdataset / Vector{GMTdataset} -> points -> view_points; polygons -> view_fv(poly2fv(...))
  • a String -> "grid"/"peaks" demo or a grid file -> view_grid; else a named solid from SOLIDS -> view_fv

With no argument, iview() opens an empty drag-and-drop launcher window: drop a grid / image / table file (anything GMT.gmtread reads) onto it — or onto any open viewer window — to open it in a new window.

E.g. iview("torus"), iview(GMT.peaks()), iview(poly_dataset), iview(torus(R=6)), iview(). Line geometry has no standalone window here — overlay it on a grid with add! instead.

source
iview() -> QtEmpty

Open an empty viewer window that acts as a drag-and-drop launcher: drop a grid, image, or table file (anything GMT.gmtread understands) onto it — or onto any open viewer window — and it is added to that window and listed in its "Scene Objects" panel. Returns a QtEmpty handle.

source

Grid Viewer

InteractiveGMT.view_gridFunction
view_grid(G::GMTgrid; cmap=:auto, drape=nothing, outside=:shademesh, outside_color=200,
		  title="i'GMT", geographic=nothing)

Show a GMT.jl grid in the Qt + VTK viewer. Returns a QtFigure handle immediately; the window stays live while you keep using the REPL. Pass the handle to add! to add elements (lines/points) to this window later. cmap is any GMT colormap name (e.g. :geo, :turbo, :rainbow, :roma), applied LINEARLY over the grid's z range via makecpt; pass nothing for the built-in ramp. The default :auto picks :geo for topo/bathymetry grids (those GMT tags with cpt == "geo") and :turbo for everything else. drape is an optional GMTimage textured over the surface instead of the CPT colouring.

outside controls the grid area the drape image does NOT cover (mirrors GMTF3D):

  • :shademesh (default) — flat outside_color fill (uncovered reads as the shaded surface).
  • :shade — flat outside_color fill.
  • :transparent — see-through; the CPT-coloured base surface shows through.

outside_color is a grey 0-255 int or an (r,g,b) tuple (0-255 ints or 0-1 floats).

The surface mesh (wire edges) is HIDDEN by default; press e in the viewer to toggle it on/off (works on both the base surface and any drape).

triangulate (default true) builds the surface from 2 triangles per grid cell (diagonals, GMTF3D-style); pass false for a single quad per cell.

data overlays a GMTdataset (single or multi-segment Vector{GMTdataset}) on the surface, drawn as mode=:lines (default) or mode=:points. Its z comes from column 3 if present, else is sampled off the grid so it drapes on the relief. data_color is a grey 0-255 int, an (r,g,b) (0-255 ints or 0-1 floats), or nothing (black lines / red points). data_size sets the line width or point size in px (0 = default). Right-click an overlay for a context menu to change its colour, line style/width (lines) or size and round/square (points).

vcurtain hangs a Fledermaus-style vertical image curtain (seismic / midwater profile) along an XY track through the scene — one spec NamedTuple, or a vector of them: (; image, path, zrange, spacing=:distance, flipv=false, clip=false, clip_n=300) (same fields as add_curtain!). E.g. view_grid(G; vcurtain=(; image="sect.jpg", path=track, zrange=(-10000,0), clip=true)).

geographic is auto-detected (override with true/false). For geographic grids the vertical exaggeration is referenced to metres (1°lat ≈ 111111 m, 1°lon = that × cos(mid-lat)); z assumed metres.

source
InteractiveGMT.view_imageFunction
view_image(I::GMTimage; title="i'GMT", geographic=nothing, axes=nothing)

Show a bare GMTimage (no elevation) in the viewer: a flat plane textured with the image, opened maximized in a top-down orthographic map. Returns a QtImage handle immediately (the window stays live while you use the REPL). The status-bar readout shows the pixel colour (rgb = R G B) under the cursor instead of a z value. geographic is auto-detected (GMT.isgeog); override with true/false. Also reachable as iview(I).

source

Overlays

InteractiveGMT.add!Function
add!(fig::QtFigure, data; mode=:lines, color=nothing, size=0)

Add elements to an existing viewer window fig (returned by view_grid). data is a GMTdataset (single or multi-segment Vector{GMTdataset}), or an N×2/N×3 matrix, drawn as mode=:lines (default) or mode=:points. Elements with no z column are draped on the figure's surface. color is a name (:red, :black, ...), a 0-255 grey, an (r,g,b) (0-255 ints or 0-1 floats), or nothing (black lines / red points). size is the line width or point size in px (0 = default). Returns fig.

(Named add!, not plot!, to avoid clashing with GMT.jl's plot!.)

source
add!(p::QtXYPlot, x, y; name="", color=nothing, linewidth=0) -> QtXYPlot

Add another (x, y) line to an open X,Y plot window. Same keyword semantics as xyplot.

source

Curtains

InteractiveGMT.add_curtain!Function
add_curtain!(fig::QtFigure, path; image, zrange, spacing=:distance, flipv=false,
			 clip=false, clip_n=300)

Hang a Fledermaus-style vertical image curtain on the wall that follows the XY path through fig's scene (a seismic / midwater profile). Returns fig.

  • path — an N×2 matrix (or GMTdataset) of the track in the grid's XY coords (N=2 = a straight two-point curtain; more points weave).
  • image — a GMTimage (in-memory) OR a file-path String (gmtread).
  • zrange=(zmin,zmax) — the curtain's vertical extent in TRUE z units (same as the grid).
  • spacing:distance (image stretched by chord length, default) or :simple (even per point).
  • flipv — invert the image's vertical sense (default first scanline → top).
  • clip — cut the curtain's top edge to the grid surface so the wall hugs the relief (the image above the seafloor is dropped). Densifies the track to clip_n columns and samples fig.G along it.

The curtain shares the surface's vertical scale, so it rises/falls with the relief when the vertical exaggeration changes, and it appears in the Scene Objects panel (hideable).

source

Point Clouds

InteractiveGMT.view_pointsFunction
view_points(D; cmap=:turbo, pointsize=4, pickcolor=(0.83,0.83,0.83),
			geographic=nothing, title=...)

Show a point cloud — a GMTdataset or an N×≥3 matrix of x y z [...] rows — in the Qt + VTK viewer, colouring each point by its z through the GMT colormap cmap (any GMT name, e.g. :turbo, :roma, :geo; nothing = the built-in ramp). Returns a QtPoints handle immediately; the window stays live while you keep using the REPL.

Ctrl+right-drag a box over the cloud to select points (TOGGLE — re-dragging the same box deselects; Ctrl+Z undoes the last change). Plain right-drag stays the dolly. The selected points are highlighted in pickcolor and kept for you — read them back with selection, which returns a copy of the picked x y z [...] rows (or nothing).

  • pointsize — point size in px.
  • pickcolor — highlight colour for selected points: an (r,g,b) (0-255 ints or 0-1 floats) or a grey number.
  • geographic — auto-detected for a GMTdataset (override with true/false); treats x,y as degrees and z as metres for a physically-true vertical scale.
source

Selection

InteractiveGMT.selectionFunction
selection(fig::QtPoints) -> Matrix

Return a copy of the point-cloud rows currently selected with Ctrl+right-drag in the viewer (x y z [...]), or an EMPTY matrix (0 rows, same columns) if none are selected (or the window is closed). Test with isempty.

source

Solids

InteractiveGMT.view_fvFunction
view_fv(name::AbstractString; color=true, cmap=:turbo, edges=false, geographic=nothing,
		title="", solid_kwargs...)

Show a NAMED GMT solid from the SOLIDS catalogue ("cube", "sphere", "torus", "icosahedron", "octahedron", "dodecahedron", "tetrahedron", "cylinder", "revolve", "loft", "extrude"). The solid takes its OWN parameters — any kwarg that is NOT a viewer keyword is forwarded untouched to the GMT generator:

view_fv("cube"; r=3)                 # r = circumradius (centre→vertex)
view_fv("sphere"; n=4)               # sphere's own subdivision level
view_fv("torus"; R=8, nx=200, edges=true)
view_fv("revolve"; curve=mycurve)    # your own profile (else a demo profile)

color behaves as in view_fv(::GMTfv): true (default) = FACETED per-face colour by mean z through cmap with a MATCHING colorbar; false = smooth per-vertex z; :explicit = the solid's own baked colours (no colorbar). The remaining viewer kwargs (cmap, edges, geographic, title) behave the same.

source
InteractiveGMT.poly2fvFunction
poly2fv(D::Vector{<:GMTdataset}; cmap=:turbo, zscale=:auto, vfrac=0.2, vexag=:auto,
		isgeog=false, ncolor=256, triangulate=false) -> GMTfv

Fold a vector of closed 3-D polygons into a single coloured GMTfv ready for view_fv — one mesh face per polygon, any corner count. Each polygon needs x y z columns; a repeated closing vertex is dropped. Faces are coloured by their mean z through the GMT colormap cmap. Pass triangulate=true to fan-split every polygon into triangles (concave / non-planar polys).

source

X,Y Plot

InteractiveGMT.xyplotFunction
xyplot(x, y; name="", color=nothing, linewidth=0, title="", xlabel="X", ylabel="Y") -> QtXYPlot

Open a standalone X,Y plot window and draw the (x, y) series. y may be a matrix whose columns are separate lines sharing the same x. color accepts a name (:red, "blue"), a 0–255 / 0–1 triple, or nothing for the default. xlabel/ylabel set the axis titles. Returns a live QtXYPlot handle; add more lines with add!. Non-blocking.

t = range(0, 4π; length=400) |> collect
p = xyplot(t, sin.(t); name="sin", title="demo", ylabel="amplitude")
add!(p, t, cos.(t); name="cos", color=:blue)
source

Time & Log Axes

InteractiveGMT.xtime!Function
xtime!(p::QtXYPlot, mode) -> QtXYPlot

Format the X axis as time, reading X as Unix epoch seconds. mode is :linear (plain numbers), :date (auto by span), :date_ymd (yyyy-mm-dd), :time (HH:MM), :decyear (decimal year) or :doy (decimal day-of-year). Ticks auto-update on zoom/pan.

source
InteractiveGMT.logscale!Function
logscale!(p::QtXYPlot; x=nothing, y=nothing) -> QtXYPlot

Set base-10 log scaling on the X and/or Y axis (true = log, false = linear, nothing = leave unchanged). Data on a log axis must be positive.

source

Stick Diagrams

InteractiveGMT.stickplotFunction
stickplot(t, u, v; scale=:auto, color=nothing, title="Stick diagram", kwargs...) -> QtXYPlot
stickplot(t, azimuth; mag=nothing, kwargs...) -> QtXYPlot

Draw a stick (vector) diagram: at each t a vector is plotted from the y=0 baseline. Give the vectors as (u, v) components, or as azimuth degrees (oceanographic: 0° = up/North, clockwise) with optional mag (default 1). scale sizes the sticks (:auto ≈ 5 % of the time span per full-magnitude vector). Returns a QtXYPlot; extra keywords (xlabel, ylabel, xtime, name) pass through.

t  = collect(0:0.5:48)                 # hours
az = 90 .+ 60 .* sin.(2π .* t ./ 12)   # tide-turning current direction
stickplot(t, az; mag=1 .+ 0.3 .* cos.(2π .* t ./ 12), title="Current sticks", xlabel="hour")
source

Utilities

InteractiveGMT.save_pngFunction
save_png(path) -> Bool

Save a PNG of the most-recently-opened viewer window to path. Returns true on success.

source
InteractiveGMT.wait_windowsFunction
wait_windows()

Block (yielding, so the Qt pump keeps running) until every viewer window is closed. Useful at the tail of a julia script.jl run, where there is no REPL to keep the process alive.

source
InteractiveGMT.stereo!Function
stereo!(fig, on=-1) -> Bool

Toggle red/cyan anaglyph stereo on a viewer window (use cheap red/cyan 3-D glasses to see real depth on the relief). on=true enables, on=false disables, default -1 flips the current state. Sets the stereo type to anaglyph so it actually renders on a normal monitor. Returns the new state (true = on). fig is any viewer handle (QtFigure/QtPoints/QtFV).

source

Data Viewing

InteractiveGMT.show_tableFunction
show_table(fig, data; name="")

Show data in the window's Data Viewer spreadsheet tab and bring that tab forward. fig is any viewer handle (QtFigure/QtPoints/QtFV); data is a GMTdataset (single or multi-segment Vector{GMTdataset}), a plain matrix, or a vector. name labels the tab (defaults to the dataset's header / "matrix" / "vector"). Returns fig.

source

Types

QtFigure

Handle for a 3-D grid/image window.

fig = view_grid(G)  # Returns QtFigure

QtPoints

Handle for a point cloud window.

fig = view_points(D)  # Returns QtPoints

QtFV

Handle for a solid/mesh window.

fig = view_fv("torus")  # Returns QtFV

QtImage

Handle for an image window.

QtEmpty

Handle for an empty launcher window.

QtXYPlot

Handle for an X,Y plot window.

fig = xyplot([x y])  # Returns QtXYPlot

Index

Internal

InteractiveGMT.CRSType
CRS(proj4, wkt, epsg)

A coordinate reference system in its three interchangeable forms. An empty proj4 and wkt with epsg == 0 means UNREFERENCED data. Build one from a GMT object with crs_from.

source
InteractiveGMT.add!Method
add!(fig::QtFigure, data; mode=:lines, color=nothing, size=0)

Add elements to an existing viewer window fig (returned by view_grid). data is a GMTdataset (single or multi-segment Vector{GMTdataset}), or an N×2/N×3 matrix, drawn as mode=:lines (default) or mode=:points. Elements with no z column are draped on the figure's surface. color is a name (:red, :black, ...), a 0-255 grey, an (r,g,b) (0-255 ints or 0-1 floats), or nothing (black lines / red points). size is the line width or point size in px (0 = default). Returns fig.

(Named add!, not plot!, to avoid clashing with GMT.jl's plot!.)

source
InteractiveGMT.add!Method
add!(p::QtXYPlot, x, y; name="", color=nothing, linewidth=0) -> QtXYPlot

Add another (x, y) line to an open X,Y plot window. Same keyword semantics as xyplot.

source
InteractiveGMT.add_curtain!Method
add_curtain!(fig::QtFigure, path; image, zrange, spacing=:distance, flipv=false,
			 clip=false, clip_n=300)

Hang a Fledermaus-style vertical image curtain on the wall that follows the XY path through fig's scene (a seismic / midwater profile). Returns fig.

  • path — an N×2 matrix (or GMTdataset) of the track in the grid's XY coords (N=2 = a straight two-point curtain; more points weave).
  • image — a GMTimage (in-memory) OR a file-path String (gmtread).
  • zrange=(zmin,zmax) — the curtain's vertical extent in TRUE z units (same as the grid).
  • spacing:distance (image stretched by chord length, default) or :simple (even per point).
  • flipv — invert the image's vertical sense (default first scanline → top).
  • clip — cut the curtain's top edge to the grid surface so the wall hugs the relief (the image above the seafloor is dropped). Densifies the track to clip_n columns and samples fig.G along it.

The curtain shares the surface's vertical scale, so it rises/falls with the relief when the vertical exaggeration changes, and it appears in the Scene Objects panel (hideable).

source
InteractiveGMT.add_symbols!Method
add_symbols!(handle, x, y; z=0, symbol=:c, size=8, sizeunit=:px,
             fill=:yellow, edge=:black, edgewidth=1.0, filled=true)

Stamp a screen-constant symbol layer at points (x, y[, z]) (TRUE data coords) on an existing viewer handle (a QtFigure or a raw Scene* Ptr). symbol is a friendly name (:circle, :square, :triangle, :itriangle, :diamond, :hexagon, :pentagon, :octagon, :star, :cross, :plus, :dash, :sphere, :cube) or a 1-char GMT code. :sphere/:cube are true 3-D, lit volumes (visible from any angle, e.g. edge-on in perspective) — every other shape is a flat, unlit XY glyph. size is on screen, in :px or :pt. fill and edge accept any colour _ovl_color understands (name Symbol/String, 0-1 or 0-255 tuple). Symbols stay the same pixel size at any zoom. Returns true if the layer was added.

source
InteractiveGMT.crs_fromMethod
crs_from(O; geographic=false) -> CRS

Build the CRS for a GMT object (GMTgrid, GMTimage, GMTdataset, GMTfv, …): read whatever PROJ4 / WKT / EPSG it carries, then derive the missing forms with GMT.jl's converters, using PROJ4 as the pivot. geographic=true resolves a plain lon/lat object with no explicit projection to WGS84 (EPSG 4326). Returns NO_CRS for unreferenced data.

source
InteractiveGMT.iviewMethod
iview(x; kwargs...)

Front-door dispatcher over the Qt + VTK viewers. x may be:

  • a GMTgrid -> view_grid
  • a GMTimage -> view_image (bare image: flat plane, top-down map)
  • a GMTfv -> view_fv (faceted z-colour + matching colorbar; color=:explicit for baked colours)
  • a GMTdataset / Vector{GMTdataset} -> points -> view_points; polygons -> view_fv(poly2fv(...))
  • a String -> "grid"/"peaks" demo or a grid file -> view_grid; else a named solid from SOLIDS -> view_fv

With no argument, iview() opens an empty drag-and-drop launcher window: drop a grid / image / table file (anything GMT.gmtread reads) onto it — or onto any open viewer window — to open it in a new window.

E.g. iview("torus"), iview(GMT.peaks()), iview(poly_dataset), iview(torus(R=6)), iview(). Line geometry has no standalone window here — overlay it on a grid with add! instead.

source
InteractiveGMT.iviewMethod
iview() -> QtEmpty

Open an empty viewer window that acts as a drag-and-drop launcher: drop a grid, image, or table file (anything GMT.gmtread understands) onto it — or onto any open viewer window — and it is added to that window and listed in its "Scene Objects" panel. Returns a QtEmpty handle.

source
InteractiveGMT.logscale!Method
logscale!(p::QtXYPlot; x=nothing, y=nothing) -> QtXYPlot

Set base-10 log scaling on the X and/or Y axis (true = log, false = linear, nothing = leave unchanged). Data on a log axis must be positive.

source
InteractiveGMT.poly2fvMethod
poly2fv(D::Vector{<:GMTdataset}; cmap=:turbo, zscale=:auto, vfrac=0.2, vexag=:auto,
		isgeog=false, ncolor=256, triangulate=false) -> GMTfv

Fold a vector of closed 3-D polygons into a single coloured GMTfv ready for view_fv — one mesh face per polygon, any corner count. Each polygon needs x y z columns; a repeated closing vertex is dropped. Faces are coloured by their mean z through the GMT colormap cmap. Pass triangulate=true to fan-split every polygon into triangles (concave / non-planar polys).

source
InteractiveGMT.profile_to_xyplotMethod
profile_to_xyplot(fig) -> QtXYPlot

Open the current Profile of a 3-D viewer window fig (a Ctrl+left-drag elevation profile, or a downloaded tide series — whatever its bottom-dock Profile panel shows) in a standalone X,Y plot tool window, with its Object Manager, Analysis menu and save. The programmatic twin of the panel's right-click "Open in X,Y plot tool". fig is any 3-D viewer handle (QtFigure/…).

source
InteractiveGMT.rtp3dMethod
fout, k = rtp3d(f3d, incl_fld, decl_fld, incl_mag, decl_mag; component=0)

Reduce a magnetic field anomaly map f3d to the pole, given the inclination/declination (degrees) of the ambient field (incl_fld, decl_fld) and of the magnetization (incl_mag, decl_mag).

component selects an alternative output instead of the plain RTP: 1 = X/North, 2 = Y/East, 3 = Z/Up component. Default 0 is the RTP.

Returns the transformed grid fout and the wavenumber array k.

source
InteractiveGMT.save_pngMethod
save_png(path) -> Bool

Save a PNG of the most-recently-opened viewer window to path. Returns true on success.

source
InteractiveGMT.selectionMethod
selection(fig::QtPoints) -> Matrix

Return a copy of the point-cloud rows currently selected with Ctrl+right-drag in the viewer (x y z [...]), or an EMPTY matrix (0 rows, same columns) if none are selected (or the window is closed). Test with isempty.

source
InteractiveGMT.show_tableMethod
show_table(fig, data; name="")

Show data in the window's Data Viewer spreadsheet tab and bring that tab forward. fig is any viewer handle (QtFigure/QtPoints/QtFV); data is a GMTdataset (single or multi-segment Vector{GMTdataset}), a plain matrix, or a vector. name labels the tab (defaults to the dataset's header / "matrix" / "vector"). Returns fig.

source
InteractiveGMT.stereo!Function
stereo!(fig, on=-1) -> Bool

Toggle red/cyan anaglyph stereo on a viewer window (use cheap red/cyan 3-D glasses to see real depth on the relief). on=true enables, on=false disables, default -1 flips the current state. Sets the stereo type to anaglyph so it actually renders on a normal monitor. Returns the new state (true = on). fig is any viewer handle (QtFigure/QtPoints/QtFV).

source
InteractiveGMT.stickplotMethod
stickplot(t, u, v; scale=:auto, color=nothing, title="Stick diagram", kwargs...) -> QtXYPlot
stickplot(t, azimuth; mag=nothing, kwargs...) -> QtXYPlot

Draw a stick (vector) diagram: at each t a vector is plotted from the y=0 baseline. Give the vectors as (u, v) components, or as azimuth degrees (oceanographic: 0° = up/North, clockwise) with optional mag (default 1). scale sizes the sticks (:auto ≈ 5 % of the time span per full-magnitude vector). Returns a QtXYPlot; extra keywords (xlabel, ylabel, xtime, name) pass through.

t  = collect(0:0.5:48)                 # hours
az = 90 .+ 60 .* sin.(2π .* t ./ 12)   # tide-turning current direction
stickplot(t, az; mag=1 .+ 0.3 .* cos.(2π .* t ./ 12), title="Current sticks", xlabel="hour")
source
InteractiveGMT.update!Method
InteractiveGMT.update!()

Pull the latest InteractiveGMT source in place (fast-forward only) and rebuild the binaries. Only works for a ] dev-installed checkout — a plain Pkg.add install should use Pkg.update("InteractiveGMT") instead.

source
InteractiveGMT.view_fvMethod
view_fv(name::AbstractString; color=true, cmap=:turbo, edges=false, geographic=nothing,
		title="", solid_kwargs...)

Show a NAMED GMT solid from the SOLIDS catalogue ("cube", "sphere", "torus", "icosahedron", "octahedron", "dodecahedron", "tetrahedron", "cylinder", "revolve", "loft", "extrude"). The solid takes its OWN parameters — any kwarg that is NOT a viewer keyword is forwarded untouched to the GMT generator:

view_fv("cube"; r=3)                 # r = circumradius (centre→vertex)
view_fv("sphere"; n=4)               # sphere's own subdivision level
view_fv("torus"; R=8, nx=200, edges=true)
view_fv("revolve"; curve=mycurve)    # your own profile (else a demo profile)

color behaves as in view_fv(::GMTfv): true (default) = FACETED per-face colour by mean z through cmap with a MATCHING colorbar; false = smooth per-vertex z; :explicit = the solid's own baked colours (no colorbar). The remaining viewer kwargs (cmap, edges, geographic, title) behave the same.

source
InteractiveGMT.view_gridMethod
view_grid(G::GMTgrid; cmap=:auto, drape=nothing, outside=:shademesh, outside_color=200,
		  title="i'GMT", geographic=nothing)

Show a GMT.jl grid in the Qt + VTK viewer. Returns a QtFigure handle immediately; the window stays live while you keep using the REPL. Pass the handle to add! to add elements (lines/points) to this window later. cmap is any GMT colormap name (e.g. :geo, :turbo, :rainbow, :roma), applied LINEARLY over the grid's z range via makecpt; pass nothing for the built-in ramp. The default :auto picks :geo for topo/bathymetry grids (those GMT tags with cpt == "geo") and :turbo for everything else. drape is an optional GMTimage textured over the surface instead of the CPT colouring.

outside controls the grid area the drape image does NOT cover (mirrors GMTF3D):

  • :shademesh (default) — flat outside_color fill (uncovered reads as the shaded surface).
  • :shade — flat outside_color fill.
  • :transparent — see-through; the CPT-coloured base surface shows through.

outside_color is a grey 0-255 int or an (r,g,b) tuple (0-255 ints or 0-1 floats).

The surface mesh (wire edges) is HIDDEN by default; press e in the viewer to toggle it on/off (works on both the base surface and any drape).

triangulate (default true) builds the surface from 2 triangles per grid cell (diagonals, GMTF3D-style); pass false for a single quad per cell.

data overlays a GMTdataset (single or multi-segment Vector{GMTdataset}) on the surface, drawn as mode=:lines (default) or mode=:points. Its z comes from column 3 if present, else is sampled off the grid so it drapes on the relief. data_color is a grey 0-255 int, an (r,g,b) (0-255 ints or 0-1 floats), or nothing (black lines / red points). data_size sets the line width or point size in px (0 = default). Right-click an overlay for a context menu to change its colour, line style/width (lines) or size and round/square (points).

vcurtain hangs a Fledermaus-style vertical image curtain (seismic / midwater profile) along an XY track through the scene — one spec NamedTuple, or a vector of them: (; image, path, zrange, spacing=:distance, flipv=false, clip=false, clip_n=300) (same fields as add_curtain!). E.g. view_grid(G; vcurtain=(; image="sect.jpg", path=track, zrange=(-10000,0), clip=true)).

geographic is auto-detected (override with true/false). For geographic grids the vertical exaggeration is referenced to metres (1°lat ≈ 111111 m, 1°lon = that × cos(mid-lat)); z assumed metres.

source
InteractiveGMT.view_imageMethod
view_image(I::GMTimage; title="i'GMT", geographic=nothing, axes=nothing)

Show a bare GMTimage (no elevation) in the viewer: a flat plane textured with the image, opened maximized in a top-down orthographic map. Returns a QtImage handle immediately (the window stays live while you use the REPL). The status-bar readout shows the pixel colour (rgb = R G B) under the cursor instead of a z value. geographic is auto-detected (GMT.isgeog); override with true/false. Also reachable as iview(I).

source
InteractiveGMT.view_pointsMethod
view_points(D; cmap=:turbo, pointsize=4, pickcolor=(0.83,0.83,0.83),
			geographic=nothing, title=...)

Show a point cloud — a GMTdataset or an N×≥3 matrix of x y z [...] rows — in the Qt + VTK viewer, colouring each point by its z through the GMT colormap cmap (any GMT name, e.g. :turbo, :roma, :geo; nothing = the built-in ramp). Returns a QtPoints handle immediately; the window stays live while you keep using the REPL.

Ctrl+right-drag a box over the cloud to select points (TOGGLE — re-dragging the same box deselects; Ctrl+Z undoes the last change). Plain right-drag stays the dolly. The selected points are highlighted in pickcolor and kept for you — read them back with selection, which returns a copy of the picked x y z [...] rows (or nothing).

  • pointsize — point size in px.
  • pickcolor — highlight colour for selected points: an (r,g,b) (0-255 ints or 0-1 floats) or a grey number.
  • geographic — auto-detected for a GMTdataset (override with true/false); treats x,y as degrees and z as metres for a physically-true vertical scale.
source
InteractiveGMT.wait_windowsMethod
wait_windows()

Block (yielding, so the Qt pump keeps running) until every viewer window is closed. Useful at the tail of a julia script.jl run, where there is no REPL to keep the process alive.

source
InteractiveGMT.xtime!Method
xtime!(p::QtXYPlot, mode) -> QtXYPlot

Format the X axis as time, reading X as Unix epoch seconds. mode is :linear (plain numbers), :date (auto by span), :date_ymd (yyyy-mm-dd), :time (HH:MM), :decyear (decimal year) or :doy (decimal day-of-year). Ticks auto-update on zoom/pan.

source
InteractiveGMT.xyplotMethod
xyplot(x, y; name="", color=nothing, linewidth=0, title="", xlabel="X", ylabel="Y") -> QtXYPlot

Open a standalone X,Y plot window and draw the (x, y) series. y may be a matrix whose columns are separate lines sharing the same x. color accepts a name (:red, "blue"), a 0–255 / 0–1 triple, or nothing for the default. xlabel/ylabel set the axis titles. Returns a live QtXYPlot handle; add more lines with add!. Non-blocking.

t = range(0, 4π; length=400) |> collect
p = xyplot(t, sin.(t); name="sin", title="demo", ylabel="amplitude")
add!(p, t, cos.(t); name="cos", color=:blue)
source