Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
1893d97
Add gallery example for PyGMT logo
yvonnefroehlich Jul 4, 2026
7a18809
Add comments
yvonnefroehlich Jul 4, 2026
2220886
Merge branch 'main' into add-gallery-pygmtlogo
yvonnefroehlich Jul 4, 2026
3beb24a
Fix projection argument
yvonnefroehlich Jul 4, 2026
9e1529e
Adjust region, projection and background color
yvonnefroehlich Jul 4, 2026
49bfc61
Adjust size and background color
yvonnefroehlich Jul 4, 2026
624be9d
Use 'width' and 'height' parameters
yvonnefroehlich Jul 5, 2026
6f29d3d
Adjust background color
yvonnefroehlich Jul 5, 2026
0829fcf
Change thumbnail image
yvonnefroehlich Jul 5, 2026
d053a1f
Improve intro text
yvonnefroehlich Jul 5, 2026
cc2c342
Use Frame parameter class
yvonnefroehlich Jul 5, 2026
db886f8
Fix line length
yvonnefroehlich Jul 5, 2026
3514aea
Adjust line length
yvonnefroehlich Jul 5, 2026
f475c68
Improve intro text
yvonnefroehlich Jul 5, 2026
a039543
Improve intro text
yvonnefroehlich Jul 5, 2026
d291294
Explain parameter 'width' and 'height'
yvonnefroehlich Jul 5, 2026
c4af57a
Fix highlighting
yvonnefroehlich Jul 6, 2026
c1630f8
Merge branch 'main' into add-gallery-pygmtlogo
yvonnefroehlich Jul 6, 2026
4312934
Adjust word
yvonnefroehlich Jul 6, 2026
beba8e4
Remove background of desgin idea
yvonnefroehlich Jul 6, 2026
377c607
Merge branch 'main' into add-gallery-pygmtlogo
yvonnefroehlich Jul 6, 2026
9ebd2cb
Add links across the gallery examples for the two logos
yvonnefroehlich Jul 6, 2026
027caf1
Shorten formulation
yvonnefroehlich Jul 6, 2026
1e83738
Remove period
yvonnefroehlich Jul 7, 2026
d03d787
Set thumbnail image to first figure
yvonnefroehlich Jul 7, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions examples/gallery/embellishments/gmt_logo.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
========

The :meth:`pygmt.Figure.logo` method allows to place the GMT logo on a figure.
For plotting the PyGMT logo, see :doc:`PyGMT logo </gallery/embellishments/pygmtlogo>`.
"""

# %%
Expand Down
62 changes: 62 additions & 0 deletions examples/gallery/embellishments/pygmtlogo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
"""
PyGMT logo
==========
Beside the :doc:`GMT logo </gallery/embellishments/gmt_logo>`, there is a specific logo
for PyGMT which can be plotted and added to a figure using
:meth:`pygmt.Figure.pygmtlogo`. The design of the logo itself is kindly provided by
`@sfrooti <https://github.com/sfrooti>`_ and consists of an icon and the wordmark
"PyGMT".

The visual logo is available in circle and hexagon shapes. It supports both colored and
monochrome black-and-white palettes, alongside light and dark theme modes, combining to
yield eight distinct standalone logo variants. Additionally, the visual logo can
optionally include the wordmark "PyGMT"; if enabled, the wordmark can be positioned
either to the right of the icon or beneath it.
"""

# %%
import pygmt
from pygmt.params import Frame

# %%
# Plot the PyGMT logo without any arguments.

fig = pygmt.Figure()
fig.pygmtlogo()
fig.show()


# %%
# Via the ``color``, ``theme``, ``shape`` parameters the appereance of the logo can be
# changed.

fig = pygmt.Figure()
fig.basemap(region=[-1, 1] * 2, projection="X5c/5c", frame=Frame(fill="180/199/231"))

fig.pygmtlogo(color=False, position="TL")

fig.pygmtlogo(theme="dark", position="TR")

fig.pygmtlogo(color=False, theme="dark", position="BL")

fig.pygmtlogo(shape="hexagon", position="BR")

fig.show()


# %%
# Via the ``wordamrk`` parameter the text "PyGMT" can be added on the right side or at
# the bottom of the visual. Use the ``width`` and ``height`` parameters to adjust the
# size of the logo.

fig = pygmt.Figure()
fig.basemap(region=[-1, 1] * 2, projection="X7c/5c", frame=Frame(fill="180/199/231"))

fig.pygmtlogo(wordmark="horizontal", position="TC", width="6c")

fig.pygmtlogo(theme="dark", wordmark="vertical", position="BC", height="3c")

fig.show()


# sphinx_gallery_thumbnail_number = 1
Loading