Overview
Why PyGMT
A beautiful map is worth a thousand words. To experience the power of PyGMT, try it online with Binder or Google Colab without installing anything on your computer.
For a quick introduction, check out our 3-minute overview. Afterward, try the Intro to PyGMT tutorial on your own, explore the Gallery for inspiration, follow the Tutorials to learn more, explore available map Projections, and finally check out some external PyGMT examples.
Background
PyGMT is a Python wrapper for the Generic Mapping Tools (GMT), a command-line program widely used across the Earth, Ocean, and Planetary sciences and beyond. It provides capabilities for processing spatial data (gridding, filtering, masking, FFTs, etc) and making high quality plots and maps.
PyGMT is different from Python libraries like Bokeh and Matplotlib, which have a larger focus on interactivity and allowing different backends. GMT uses the PostScript format to generate high quality (static) vector graphics for publications, posters, talks, etc. It is memory efficient and very fast. The PostScript figures can be converted to other formats like PDF, PNG, and JPG for use on the web and elsewhere. In fact, PyGMT users will usually not have any contact with the original PostScript files and get only the more convenient formats like PDF and PNG.
For more information about the design and development of PyGMT, see the PyGMT paper published in Geochemistry, Geophysics, Geosystems.
Project goals
From the beginning, the project has aimed to achieve the following goals:
Make GMT more accessible to new users.
Build a Pythonic API for GMT.
Interface with the GMT C API directly using ctypes (no system calls).
Support rich display in the Jupyter notebook.
Integrate with the scientific Python ecosystem:
numpy.ndarrayorpandas.DataFramefor data tables,xarray.DataArrayfor grids, andgeopandas.GeoDataFramefor geographical data.
Community
The PyGMT project was started in 2017 by Leonardo Uieda and Paul Wessel (the co-creator and main developer of GMT) at the University of Hawaiʻi at Mānoa. Currently, the project is community-driven and maintained by an international team, with contributions from multiple contributors.
We welcome any feedback, ideas, and contributions! Let us know by submitting issues on GitHub or by posting on our Discourse forum.
Funding
The development of PyGMT has been supported by NSF grants OCE-1558403 and EAR-1948602.
License
PyGMT is free software: you can redistribute it and/or modify it under the terms of the BSD 3-clause License. A copy of this license is provided in LICENSE.txt.