Getting Started

Installation

Requirements: Windows only. The viewer ships as a Windows DLL.

1. Julia

Install Julia — Julia 1.10 is strongly recommended — and make sure it is on your PATH. Follow the Windows install guide.

2. GMT.jl

If not already installed, from the Julia REPL package mode (press ]):

] add GMT

Make sure you have at least GMT.jl version 1.41.2 (to update GMT.jl do on the Julia console ] up GMT)

3. InteractiveGMT

using GMT

iGMTinstall()

4. The i'GMT

You have now a new icon on your desktop i'GMT. Use it as a normal Graphical Program.

Drag and drop files on the icon or an empty iGMT display. Or use the normal File -> Open ...

Quick Start from Julia

using InteractiveGMT

# View a grid
G = GMT.peaks()
fig = viz(G)

# View points
D = GMT.mat2ds(rand(100,3))
fig = viz(D; color="red")

# X,Y plot
t = 0:0.1:10
y = sin.(t)
fig = plot([t y])

The window opens immediately. The REPL stays usable.

One name per job: using InteractiveGMT is enough

iGMT uses GMT.jl's own names and keyword syntax for the jobs GMT.jl already has a function for: plot / plot! (the X,Y plot tool), feather (stick diagrams), viz (the 3-D viewer), scatter! (symbols on an open window) and orbits! (a satellite ground track). iview is an alias of viz.

using InteractiveGMT re-exports all of GMT.jl except the names iGMT shadows (plot, plot!, feather, viz), so do not also write using GMT: loading both makes plot, viz, ... ambiguous. If you need both, resolve it with using InteractiveGMT: plot, plot!, feather, viz. The static GMT.jl versions stay reachable qualified: GMT.plot, GMT.viz, ... A GMT.jl keyword the interactive window cannot honour (region, frame, savefig, ...) is an error that names it.

Basic Concepts

Handles

Every viewer function returns a handle:

  • QtFigure — 3-D grid/image window
  • QtPoints — Point cloud window
  • QtFV — Solid/mesh window
  • QtXYPlot — X,Y plot window

Use these handles to add data, check status, or save.

Non-Blocking Calls

All viewer calls return immediately. A Julia Timer pumps the Qt event loop at ~50 Hz.

In scripts without a REPL, end with wait_windows() to keep the process alive:

fig = viz(G)
wait_windows()  # Blocks until all windows close

In-Window Julia Console

Every 3-D viewer has a Julia Console dock at the bottom. Type Julia commands directly:

# In the console
add!(fig, [1 2 3; 4 5 6]; mode=:lines)

The fig handle is pre-bound to that window.

Next Steps