GMT Modules (Classic Mode)


Looking for the modern mode modules like begin and figure? See the equivalent page for modern mode.

This is a list of all GMT “classic mode” core and supplemental modules and their uses, as well as some utility scripts. These modules are fully compatible with GMT 4 and 5. All modules are requested via a call to the gmt program.



gmtlogo Plot the GMT logo on maps
grdcontour Contouring of 2-D gridded data sets
grdimage Produce images from 2-D gridded data sets
grdvector Plotting of 2-D gridded vector fields
grdview 3-D perspective imaging of 2-D gridded data sets
psbasemap Create a basemap plot
psclip Use polygon files to define clipping paths
pscoast Plot (and fill) coastlines, borders, and rivers on maps
pscontour Contour or image raw table data by triangulation
psevents Plot event symbols and labels for a moment in time
pshistogram Plot a histogram
psimage Plot Sun raster files on a map
pslegend Plot a legend on a map
psmask Create overlay to mask out regions on maps
psrose Plot sector or rose diagrams
psscale Plot gray scale or color scale on maps
pssolar Plot day-light terminators and other sunlight parameters
psternary Plot data on ternary diagrams
pstext Plot text strings on maps
pswiggle Draw table data time-series along track on maps
psxy Plot symbols, polygons, and lines on maps
psxyz Plot symbols, polygons, and lines in 3-D


blockmean L\(_2\) (x,y,z) table data filter/decimator
blockmedian L\(_1\) (x,y,z) table data filter/decimator
blockmode Mode estimate (x,y,z) table data filter/decimator
dimfilter Directional filtering of 2-D gridded files in the space/time domain
filter1d Time domain filtering of 1-D data tables
grdfilter Filter 2-D gridded data sets in the space domain


greenspline Interpolation with Green’s functions for splines in 1–3 D
nearneighbor Nearest-neighbor gridding scheme
sphinterpolate Spherical gridding in tension of data on a sphere
surface A continuous curvature gridding algorithm
triangulate Perform optimal Delauney triangulation and gridding

Sampling of 1-D and 2-D data

gmtsimplify Line reduction using the Douglas-Peucker algorithm
grdsample Resample a 2-D gridded data set onto a new grid
grdtrack Sample 2-D gridded data sets at specified (x,y) locations
sample1d Resampling of 1-D table data sets

Projection and map-transformation

grdproject Project gridded data sets onto a new coordinate system
mapproject Transformation of coordinate systems for table data
project Project table data onto lines or great circles

Information retrieval

gmtdefaults List the current default settings
gmtget Retrieve selected parameters in current file
gmtinfo Get information about table data files
gmtset Change selected parameters in current file
grdinfo Get information about grid files

Mathematical operations on tables or grids

gmtmath Mathematical operations on table data
makecpt Make color palette tables
spectrum1d Compute various spectral estimates from time-series
sph2grd Compute grid from spherical harmonic coefficients
sphdistance Create grid of NN or distances to nearest points on a sphere
sphtriangulate Delaunay or Voronoi construction of spherical (lon,lat) data

Convert or extract subsets of data

gmtconnect Connect segments into more complete lines or polygons
gmtconvert Convert data tables from one format to another
gmtselect Select subsets of table data based on multiple spatial criteria
gmtspatial Geospatial operations on lines and polygons
gmtvector Operations on Cartesian vectors in 2-D and 3-D
grd2kml Create KML image quadtree from single grid
grd2xyz Conversion from 2-D grid file to table data
grdblend Blend several partially over-lapping grid files onto one grid
grdconvert Converts grid files into other grid formats
grdcut Cut a sub-region from a grid file
grdpaste Paste together grid files along a common edge
splitxyz Split xyz files into several segments
xyz2grd Convert an equidistant table xyz file to a 2-D grid file

Grid operations

grd2cpt Make color palette table from a grid files
grdclip Limit the z-range in gridded data sets
grdedit Modify header information in a 2-D grid file
grdfft Perform operations on grid files in the frequency domain
grdfill Interpolate across holes in a grid
grdgradient Compute directional gradient from grid files
grdhisteq Histogram equalization for grid files
grdlandmask Create masking grid files from shoreline data base
grdmask Reset grid nodes in/outside a clip path to constants
grdmath Mathematical operations on grid files
grdvolume Calculate volumes under a surface within specified contour


docs Show HTML documentation of specified module
gmt2kml Like plot but writes KML for use in Google Earth
gmtwhich Find full path to specified files
kml2gmt Extracts coordinates from Google Earth KML files
psconvert Crop and convert PostScript files to raster images, EPS, and PDF


earthtide Compute grids or time-series of solid Earth tides
gpsgridder Interpolate GPS velocity vectors using Green’s functions for a thin elastic sheet
psvelo Plot velocity vectors, crosses, and wedges on maps


gshhg Extract data tables from binary GSHHS or WDBII data files


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


mgd77convert Convert MGD77 data to other file 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-line map of MGD77 cruises


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, 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


pssegyz Plot a SEGY file on a map in 3-D
pssegy Plot a SEGY file on a map
segy2grd Converting SEGY data to a GMT grid


pscoupe Plot cross-sections of focal mechanisms
psmeca Plot focal mechanisms on maps
pspolar Plot polarities on the inferior focal half-sphere on maps
pssac Plot seismograms in SAC format on maps


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 image from a gravity or topography grid
hotspotter Create CVA image 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_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