Skip to content
Merged
Changes from 10 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
58 changes: 58 additions & 0 deletions examples/gallery/embellishments/pygmtlogo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
"""
PyGMT logo
==========
Beside the GMT logo, there is a separate PyGMT logo 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 a visual and the
wordmark "PyGMT".

The visual is available in circle and hexagon shapes. It can be plotted using colors
of Python (blue Earth and yellow compass lines) and GMT (red letters GMT) or in black
and white as well as in light or dark mode. The wordmark can be added on the right
side or at the bottom of the visual.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Parehaps rewording it like:

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 8 distinct standalone icon variants.

Separately, 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.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made some changes to the formulations, but still not 100 % happy. Would like to include some background of the desgin idea.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would like to include some background of the desgin idea.

That's a good idea,but I feel it should be added directly to the docstring of the Figure.pygmtlogo method

"""

# %%
import pygmt

# %%
# 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, -1, 1], projection="X4.5c/4.5c", frame="+g180/199/231")
Comment thread
yvonnefroehlich marked this conversation as resolved.
Outdated

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:

fig = pygmt.Figure()
fig.basemap(region=[-1, 1, -1, 1], projection="X7c/5c", frame="+g180/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 = 3
Comment thread
yvonnefroehlich marked this conversation as resolved.
Outdated
Loading