= GMT python wrappers = While there are [http://www.google.com/serch?q=gmt+python other, more sophisticated python interfaces] for the [http://gmt.soest.hawaii.edu Generic Mapping Tools (GMT)] around, we found it simplest to write our own, script based interface. The [wiki:hc_docu hc] and [wiki:larry_docu larry] modules, as well as the SEATREE GUI use the[http://geosys.usc.edu/projects/seatree/browser/py-drivers/py-common/gmtPlotter.py gmtPlotter] class for geographic plots. gmtPlotter.py implements a very simple wrapper approach that issues command-line calls which can be echoed to the shell. A simple python example for how to use t[http://geosys.usc.edu/projects/seatree/browser/py-drivers/py-common/gmtPlotter.py gmtPlotter] to make a PNG plot showing global land outlines and plate boundaries is {{{ #!python import sys, os from gmtPlotter import * # get the gmtPlotter class verbose=3 # verbosity # # get a plotter instance # myPlotter = GMTPlotter(verbose,"","/tmp/","","") # # set the projection # myPlotter.setMapProjection(GMTProjection("H",180,"",7,"")) # # set the region # myPlotter.setPlotRange(0, 360, -90, 90) # # coast line settings myPlotter.setCoastlineResolution("l") myPlotter.setCoastlineMaskArea(8000) # # myPlotter.setAnnotation("g60/g30") # # PS output # outfile="out.ps" # output file # # create the plot myPlotter.initPSFile(outfile) myPlotter.drawCoastline(solid=12) # draw land mass and coast lines myPlotter.drawPlateBoundaries() myPlotter.closePSFile() # done }}} Note that neither SEATREE nor the [http://geosys.usc.edu/projects/seatree/browser/py-drivers/py-common/gmtPlotter.py gmtPlotter] class make full use of [http://gmt.soest.hawaii.edu GMT]'s capabilities. If you are merely interested in mapping, you might wish to check the [http://www.seismology.harvard.edu/~becker/igmt iGMT] web page. iGMT is a Tcl/Tk GUI interface for GMT script generation.