PyGMT

dev

Getting Started

  • Overview
  • Installing
  • Intro to PyGMT

User Guide

  • Tutorials
  • Gallery
    • Maps and map elements
    • Lines and vectors
    • Symbols and markers
    • Images, contours, and fields
    • 3-D Plots
    • Seismology and geodesy
    • Base maps
    • Histograms
    • Plot embellishments
      • Colorbar
      • Day-night terminator and twilights
      • GMT logo
      • Inset
      • Inset map showing a rectangular region
      • Legend
      • Multiple colormaps
      • PyGMT logo
      • Scale bar
      • Text formatting
      • Timestamp
  • Projections
  • External Resources

Reference Documentation

  • API Reference
  • Technical Reference
  • Changelog
  • Minimum Supported Versions
  • Ecosystem

Development

  • PyGMT Team
  • Contributors Guide
  • Maintainers Guide

Getting help and contributing

  • Code of Conduct
  • License
  • Contact
  • Source Code
PyGMT
  • Gallery
  • PyGMT logo
  • Improve this page

Note

Go to the end to download the full example code.

PyGMT logo

Beside the GMT logo, there is a separate PyGMT logo which can be plotted and added to a figure using pygmt.Figure.pygmtlogo. The design of the logo itself is kindly provided by @sfrooti and consists of a visual and the wordmark “PyGMT”. The logo is available in circle and hexagon shape. It can be plotted using colors of Python (blue and yellow) and GMT (red) or in black and white as well as in light or dark mode. The wordmark can be added at the right side or bottom of the visual.

pygmt logo
import pygmt

# All versions
# modified from
# https://github.com/GenericMappingTools/pygmt/pull/3849#issuecomment-2753372170
# by @seisman
fig = pygmt.Figure()

# Logo without workmark.
fig.basemap(region=[0, 7, 0, 13], projection="x1c", frame=["a1f1g1", "+ggray50"])
for x, y, theme in [(1, 3, "light"), (4, 3, "dark")]:
    for color, shape in [
        (True, "circle"),
        (True, "hexagon"),
        (False, "circle"),
        (False, "hexagon"),
    ]:
        fig.pygmtlogo(
            color=color,
            theme=theme,
            shape=shape,
            wordmark=False,
            position=f"g{x}/{y}+jTL+w2c",
        )
        y += 3  # noqa: PLW2901

fig.shift_origin(xshift=8)

# Logo with vertical wordmark.
fig.basemap(region=[0, 7, 0, 13], projection="x1c", frame=["a1f1g1", "+ggray50"])
for x, y, theme in [(1, 3, "light"), (4, 3, "dark")]:
    for color, shape in [
        (True, "circle"),
        (True, "hexagon"),
        (False, "circle"),
        (False, "hexagon"),
    ]:
        fig.pygmtlogo(
            color=color,
            theme=theme,
            shape=shape,
            wordmark="vertical",
            position=f"g{x}/{y}+jTL+w2c",
        )
        y += 3  # noqa: PLW2901

fig.shift_origin(xshift=8)

# Logo with horizontal wordmark.
fig.basemap(region=[0, 20, 0, 13], projection="x1c", frame=["a1f1g1", "+ggray50"])
for x, y, theme in [(1, 3, "light"), (11, 3, "dark")]:
    for color, shape in [
        (True, "circle"),
        (True, "hexagon"),
        (False, "circle"),
        (False, "hexagon"),
    ]:
        fig.pygmtlogo(
            color=color,
            theme=theme,
            shape=shape,
            wordmark="horizontal",
            position=f"g{x}/{y}+jTL+w0/2c",
        )
        y += 3  # noqa: PLW2901

fig.show(width=1000)

Total running time of the script: (0 minutes 2.837 seconds)

Download Jupyter notebook: pygmt_logo.ipynb

Download Python source code: pygmt_logo.py

Download zipped: pygmt_logo.zip

Gallery generated by Sphinx-Gallery

Previous Next

© Copyright 2017-2026, The PyGMT Developers. Revision 27937b5e. Last updated on Feb 05, 2026.

Built with Sphinx using a theme provided by Read the Docs

This website uses Google Analytics to gather usage statistics. However, it does not use cookies or track you across different websites. Page view data are used to help us improve the site and provide an estimate of the software usage.