# A Python interface for the [Generic Mapping Tools](https://www.generic-mapping-tools.org/)
[](https://github.com/GenericMappingTools/pygmt/releases)
[](https://pypi.org/project/pygmt)
[](https://anaconda.org/conda-forge/pygmt)
[](https://pypi.org/project/pygmt)
[](https://doi.org/10.1029/2026GC013105)
[](https://doi.org/10.5281/zenodo.3781524)
[](https://github.com/GenericMappingTools/pygmt/blob/main/LICENSE.txt)
[](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests.yaml)
[](https://github.com/GenericMappingTools/pygmt/actions/workflows/ci_tests_dev.yaml)
[](https://app.codecov.io/gh/GenericMappingTools/pygmt)
## Why PyGMT?
PyGMT is a library for processing geospatial and geophysical data and making
publication-quality maps and figures. It provides a Pythonic interface for the
[Generic Mapping Tools (GMT)](https://github.com/GenericMappingTools/gmt), a command-line
program widely used across the Earth, Ocean, and Planetary sciences and beyond.
A beautiful map is worth a thousand words. To experience the power of PyGMT, try it
online with [Binder or Google Colab](https://github.com/GenericMappingTools/try-gmt)
without installing anything on your computer. For a quick introduction, check out
our [3 minute overview](https://youtu.be/4iPnITXrxVU)!
## Dependencies
PyGMT depends on GMT and the following Python libraries:
- **Required**:
[NumPy](https://numpy.org/),
[pandas](https://pandas.pydata.org/),
[xarray](https://xarray.pydata.org/),
[packaging](https://packaging.pypa.io/en/stable/)
- **Optional**:
[IPython](https://ipython.org/),
[GeoPandas](https://geopandas.org/),
[contextily](https://contextily.readthedocs.io/),
[rioxarray](https://corteva.github.io/rioxarray/),
[PyArrow](https://arrow.apache.org/docs/python/)
For detailed version requirements, see [Minimum Supported Versions](https://www.pygmt.org/latest/minversions.html).
## Quickstart
Install PyGMT using [conda](https://docs.conda.io/projects/conda/en/latest/user-guide/index.html):
```bash
conda install --channel conda-forge pygmt
```
Then try the following example in a Python interpreter or Jupyter notebook. You should
see a global map with land and water masses colored in tan and lightblue, respectively,
with the semi-transparent text "PyGMT" on top.
```python
import pygmt
fig = pygmt.Figure()
fig.basemap(projection="R7c", region=[0, 360, -90, 90], frame=True)
fig.coast(land="tan", water="lightblue")
fig.text(position="MC", text="PyGMT", font="40p,AvantGarde-Book,red@75")
fig.show()
```
## Documentation
- Documentation: [Latest version](https://www.pygmt.org/latest/) | [Development version](https://www.pygmt.org/dev/)
- [Full installation instructions](https://www.pygmt.org/latest/install.html)
- [Gallery](https://www.pygmt.org/latest/gallery/index.html) and [Tutorials](https://www.pygmt.org/latest/tutorials/index.html)
- [PyGMT Ecosystem](https://www.pygmt.org/latest/ecosystem.html)
- [Citing PyGMT](https://www.pygmt.org/dev/citing.html)
## Contacting us
- Most discussion happens [on GitHub](https://github.com/GenericMappingTools/pygmt).
Feel free to [open an issue](https://github.com/GenericMappingTools/pygmt/issues/new)
or comment on any open issue or pull request.
- We have a [Discourse forum](https://forum.generic-mapping-tools.org/c/questions/pygmt-q-a)
where you can ask questions and leave comments.
## Code of conduct
We want everyone to feel welcome to contribute to this project and participate in
discussions. In that spirit please have a look at our
[Code of Conduct](https://github.com/GenericMappingTools/.github/blob/main/CODE_OF_CONDUCT.md).
## Contributing
**Imposter syndrome disclaimer**: We want your help. No, really.
There may be a little voice inside your head that is telling you that you're not ready
to be an open source contributor; that your skills aren't nearly good enough to
contribute. What could you possibly offer?
We assure you that the little voice in your head is wrong.
**Being a contributor doesn't just mean writing code.** Equally important contributions
include: writing or proof-reading documentation, suggesting or implementing tests, or
even giving feedback about the project (including giving feedback about the contribution
process). If you're coming to the project with fresh eyes, you might see the errors and
assumptions that seasoned contributors have glossed over. If you can write any code at
all, you can contribute code to open source. We are constantly trying out new skills,
making mistakes, and learning from those mistakes. That's how we all improve and we are
happy to help others learn.
Please read our [Contributing Guide](https://github.com/GenericMappingTools/pygmt/blob/main/CONTRIBUTING.md)
to see how you can help and give feedback.
*This disclaimer was adapted from the* [MetPy project](https://github.com/Unidata/MetPy).
## Related projects
Other official GMT wrappers include:
- [GMT.jl](https://github.com/GenericMappingTools/GMT.jl): A Julia wrapper for GMT.
- [gmtmex](https://github.com/GenericMappingTools/gmtmex): A Matlab/Octave wrapper for GMT.
## Funding
The development of PyGMT has been supported by NSF grants
[OCE-1558403](https://www.nsf.gov/awardsearch/show-award/?AWD_ID=1558403) and
[EAR-1948602](https://www.nsf.gov/awardsearch/show-award/?AWD_ID=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](https://github.com/GenericMappingTools/pygmt/blob/main/LICENSE.txt).