Modules — GMT 6.3.0 documentation

# Modules

Note

Looking for the classic mode modules like `psxy` and `pscoast`? See the equivalent page for classic mode.

This is a list of all GMT core and supplemental modules and their uses, as well as some utility scripts. All modules are requested via a call to the gmt program.

## Program

- gmt

## Core Modules

basemap batch begin blockmean blockmedian blockmode clear clip coast colorbar contour dimfilter docs end events figure filter1d | fitcircle gmt2kml gmtbinstats gmtconnect gmtconvert gmtdefaults gmtget gmtinfo gmtlogo gmtmath gmtregress gmtselect gmtset gmtsimplify gmtspatial gmtsplit gmtvector | gmtwhich grd2cpt grd2kml grd2xyz grdblend grdclip grdcontour grdconvert grdcut grdedit grdfft grdfill grdfilter grdgdal grdgradient grdhisteq | grdimage grdinfo grdinterpolate grdlandmask grdmask grdmath grdmix grdpaste grdproject grdsample grdselect grdtrack grdtrend grdvector grdview grdvolume | greenspline histogram image inset kml2gmt legend makecpt mapproject mask movie nearneighbor plot plot3d project psconvert rose | sample1d solar spectrum1d sph2grd sphdistance sphinterpolate sphtriangulate subplot surface ternary text trend1d trend2d triangulate wiggle xyz2grd

## Supplemental Modules

earthtide gpsgridder velo gshhg img2grd mgd77convert mgd77header mgd77info mgd77list | mgd77magref mgd77manage mgd77path mgd77sniffer mgd77track gmtflexure gmtgravmag3d gravfft grdflexure | grdgravmag3d grdredpol grdseamount talwani2d talwani3d segy2grd segy segyz | coupe meca polar sac backtracker gmtpmodeler grdpmodeler grdrotater | grdspotter hotspotter originater polespotter rotconverter rotsmoother x2sys_binlist x2sys_cross | x2sys_datalist x2sys_get x2sys_init x2sys_list x2sys_merge x2sys_put x2sys_report x2sys_solve

## Utility Scripts

gmt-config | gmt5syntax | gmt_shell_functions.sh | gmtswitch | img2google |

## Session management

begin | Initiate a new GMT modern mode session
clear | Delete current default settings, or the cache, data, geography or sessions directories
docs | Show HTML documentation of specified module
end | Terminate GMT modern mode session and produce optional graphics
figure | Set attributes for the current modern mode session figure
inset | Manage figure inset setup and completion
subplot | Manage modern mode figure subplot configuration and selection

## Plotting

basemap | Plot base maps and frames
clip | Initialize or terminate polygonal clip paths
coast | Plot continents, countries, shorelines, rivers, and borders
colorbar | Plot gray scale or color scale bar
contour | Contour table data by direct triangulation
events | Plot event symbols, lines, polygons and labels for one moment in time
gmtlogo | Plot the GMT logo
grdcontour | Make contour map using a grid
grdimage | Project and plot grids or images
grdvector | Plot vector field from two component grids
grdview | Create 3-D perspective image or surface mesh from a grid
histogram | Calculate and plot histograms
image | Plot raster or EPS images
legend | Plot a legend
mask | Clip or mask map areas with no data table coverage
plot | Plot lines, polygons, and symbols in 2-D
plot3d | Plot lines, polygons, and symbols in 3-D
rose | Plot a polar histogram (rose, sector, windrose diagrams)
solar | Plot day-light terminators and other sunlight parameters
ternary | Plot data on ternary diagrams
text | Plot or typeset text
wiggle | Plot z = f(x,y) anomalies along tracks

## Filtering

blockmean | Block average (x,y,z) data tables by mean estimation
blockmedian | Block average (x,y,z) data tables by median estimation
blockmode | Block average (x,y,z) data tables by mode estimation
dimfilter | Directional filtering of grids in the space domain
filter1d | Time domain filtering of 1-D data tables
grdfilter | Filter a grid in the space (or time) domain

## Gridding

greenspline | Interpolate using Green’s functions for splines in 1-3 dimensions
nearneighbor | Grid table data using a "Nearest neighbor" algorithm
sphinterpolate | Spherical gridding in tension of data on a sphere
surface | Grid table data using adjustable tension continuous curvature splines
triangulate | Delaunay triangulation or Voronoi partitioning and gridding of Cartesian data
grdinterpolate | Interpolate a 3-D cube, 2-D grids or 1-D series from a 3-D data cube or stack of 2-D grids

## Sampling of 1-D and 2-D data

gmtsimplify | Line reduction using the Douglas-Peucker algorithm
grdsample | Resample a grid onto a new lattice
grdtrack | Sample grids at specified (x,y) locations
sample1d | Resample 1-D table data using splines

## Projection and map-transformation

grdproject | Forward and inverse map transformation of grids
mapproject | Forward and inverse map transformations, datum conversions and geodesy
project | Project data onto lines or great circles, or generate tracks

## Information retrieval

gmtdefaults | List current GMT default settings
gmtget | Get individual GMT default settings or download data sets
gmtinfo | Get information about data tables
gmtset | Change individual GMT default settings
grdinfo | Extract information from 2-D grids or 3-D cubes
grdselect | Make selections or determine common regions from 2-D grids, images or 3-D cubes

## Mathematical operations on tables or grids

gmtmath | Reverse Polish Notation (RPN) calculator for data tables
makecpt | Make GMT color palette tables
spectrum1d | Compute auto- [and cross-] spectra from one [or two] time series
sph2grd | Compute grid from spherical harmonic coefficients
sphdistance | Create Voronoi distance, node, or natural nearest-neighbor grid on a sphere
sphtriangulate | Delaunay or Voronoi construction of spherical data

## Convert or extract subsets of data

gmtbinstats | Bin spatial data and determine statistics per bin
gmtconnect | Connect individual lines whose end points match within tolerance
gmtconvert | Convert, paste, or extract columns from data tables
gmtselect | Select data table subsets based on multiple spatial criteria
gmtspatial | Geospatial operations on points, lines and polygons
gmtsplit | Split xyz[dh] data tables into individual segments
gmtvector | Operations on Cartesian vectors in 2-D and 3-D
grd2kml | Create KML image quadtree from single grid
grd2xyz | Convert grid to data table
grdblend | Blend several partially overlapping grids into one larger grid
grdconvert | Convert between different grid formats
grdcut | Extract subregion from a grid or image
grdpaste | Join two grids along their common edge
xyz2grd | Convert data table to a grid

## Trends in 1-D and 2-D data

fitcircle | Find mean position and great [or small] circle fit to points on sphere
gmtregress | Linear regression of 1-D data sets
grdtrend | Fit trend surface to grids and compute residuals
trend1d | Fit [weighted] [robust] polynomial/Fourier model for y = f(x) to xy[w] data
trend2d | Fit [weighted] [robust] polynomial for z = f(x,y) to xyz[w] data

## Grid operations

grd2cpt | Make linear or histogram-equalized color palette table from grid
grdclip | Clip the range of grid values
grdedit | Modify header or content of a grid
grdfft | Mathematical operations on grids in the spectral domain
grdfill | Interpolate across holes in a grid
grdgradient | Compute directional gradients from a grid
grdhisteq | Perform histogram equalization for a grid
grdlandmask | Create a "wet-dry" mask grid from shoreline data base
grdmask | Create mask grid from polygons or point coverage
grdmath | Reverse Polish Notation (RPN) calculator for grids (element by element)
grdmix | Blending and transforming grids and images
grdvolume | Calculate grid volume and area constrained by a contour

## Miscellaneous

batch | Automate batch job processing
gmt2kml | Convert GMT data table to Google Earth KML file
grdgdal | Execute GDAL raster programs from GMT
gmtwhich | Find full path to specified files
kml2gmt | Extract GMT table data from Google Earth KML files
movie | Create animation sequences and movies
psconvert | Convert [E]PS file(s) to other formats using Ghostscript

## geodesy

earthtide | Compute grids or time-series of solid Earth tides
gpsgridder | Interpolate GPS strains using Green’s functions for elastic deformation
velo | Plot velocity vectors, crosses, anisotropy bars and wedges

## GSHHG

gshhg | Extract data tables from binary GSHHG or WDBII data files

## IMG

img2grd | Extract a subset from an img file in Mercator or Geographic format

## MGD77

mgd77convert | Convert MGD77 data to other formats
mgd77header | Create MGD77 headers from A77 files
mgd77info | Extract information about MGD77 files
mgd77list | Extract data from MGD77 files
mgd77magref | Evaluate the IGRF or CM4 magnetic field models
mgd77manage | Manage the content of MGD77+ files
mgd77path | Return paths to MGD77 cruises and directories
mgd77sniffer | Along-track quality control of MGD77 cruises
mgd77track | Plot track-lines of MGD77 cruises

## potential

gmtflexure | Compute flexural deformation of 2-D loads, forces, and bending moments
gmtgravmag3d | Compute the gravity/magnetic anomaly of a 3-D body by the method of Okabe
gravfft | Spectral calculations of gravity, isostasy, admittance, and coherence for grids
grdflexure | Compute flexural deformation of 3-D surfaces for various rheologies
grdgravmag3d | Computes the gravity effect of one (or two) grids by the method of Okabe
grdredpol | Compute the Continuous Reduction To the Pole, AKA differential RTP
grdseamount | Create synthetic seamounts (Gaussian, parabolic, polynomial, cone or disc; circular or elliptical)
talwani2d | Compute geopotential anomalies over 2-D bodies by the method of Talwani
talwani3d | Compute geopotential anomalies over 3-D bodies by the method of Talwani

## SEGY

segyz | Plot a SEGY file in 3-D
segy | Plot a SEGY file in 2-D
segy2grd | Converting SEGY data to a grid

## seis

coupe | Plot cross-sections of focal mechanisms
meca | Plot focal mechanisms
polar | Plot polarities on the lower hemisphere of the focal sphere
sac | Plot seismograms in SAC format

## spotter

backtracker | Generate forward and backward flowlines and hotspot tracks
gmtpmodeler | Evaluate a plate motion model at given locations
grdpmodeler | Evaluate a plate motion model on a geographic grid
grdrotater | Finite rotation reconstruction of geographic grid
grdspotter | Create CVA grid from a gravity or topography grid
hotspotter | Create CVA grid from seamount locations
originater | Associate seamounts with nearest hotspot point sources
polespotter | Find stage poles given fracture zones and abyssal hills
rotconverter | Manipulate total reconstruction and stage rotations
rotsmoother | Get mean rotations and covariance matrices from set of finite rotations

## x2sys

x2sys_binlist | Create bin index listing from track data files
x2sys_cross | Calculate crossovers between track data files
x2sys_datalist | Extract content of track data files
x2sys_get | Get track listing from track index database
x2sys_init | Initialize a new x2sys track database
x2sys_list | Extract subset from crossover data base
x2sys_merge | Merge an updated COEs table (smaller) into the main table (bigger)
x2sys_put | Update track index database from track bin file
x2sys_report | Report statistics from crossover data base
x2sys_solve | Determine least-squares systematic correction from crossovers