gmt - Python interface to Generic Mapping Tools (Examples)

gmt.py sample code and plots

Click on any image to enlarge

All code and datasets are included in the examples directory of the source distribution.

Code: simplexy.py
Simple line plots with linear, log-linear, linear-log and loglog axes.


Code: plot_olr.py
Time-longitude (Hovmuller) plot. Requires opendap and mixedcal modules.


Code: plot_zonalmean.py
Zonal mean cross-section plot.


Code: plot_gfs.py
Panel plot of NCEP global model forecasts. Requires opendap and mixedcal modules.


Code: plot_narr.py
Plot of 40 km resolution topography. Illustrates plotting of data on a native projection grid. Requires orog.nc data file (included in source distribution).


Code: plot_reanl.py
Panel plot of NCEP/NCAR Reanalysis showing polar and cylindrical projections. Requires opendap and mixedcal modules.


Code: gmt_test.py
Rossby-Haurwitz wave number 4 streamfunction and wind-barbs. This example is run when gmt.py is executed as a stand-alone script.