Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
88f381a
Allow adjust font
seisman May 7, 2026
6abbcfd
Merge branch 'pygmtlogo' into pygmtlogo-font
seisman May 9, 2026
5693140
Merge branch 'pygmtlogo' into pygmtlogo-font
seisman May 12, 2026
7b9f053
Revert "Allow adjust font"
seisman May 12, 2026
6cdbc34
Figure.pygmtlogo: Accurate positioning of the horizontal wordmark
seisman May 13, 2026
a8330fd
Add debugging lines for horizontal wordmark
seisman May 13, 2026
f03bd50
Smaller region for horizontal wordmark
seisman May 13, 2026
479cb58
Update the baseline image for horizontal wordmark design
seisman May 13, 2026
3f9affe
Reorder variables
seisman May 13, 2026
25ac028
Figure.pygmtlogo: Improved positioning of vertical wordmark for circu…
seisman May 13, 2026
834ea25
Fix a typo
seisman May 13, 2026
07bfe56
Figure.pygmtlogo: Implement the hexagonal logo
seisman May 9, 2026
be6c052
Add a test and baseline image for circular logo with horizontal wordmark
seisman May 13, 2026
0bad58f
Merge branch 'pygmtlogo' into pygmtlogo-font
seisman May 13, 2026
6988c0f
Update baseline images
seisman May 14, 2026
2c94cf4
Merge branch 'pygmtlogo-font' into pygmtlogo-wordmark-vertical
seisman May 14, 2026
f6d08a0
Simplify the test script
seisman May 14, 2026
7eaf145
Merge branch 'pygmtlogo-font' into pygmtlogo-wordmark-vertical
seisman May 14, 2026
27882b5
Add a test and baseline images
seisman May 14, 2026
822c6de
Merge branch 'pygmtlogo' into pygmtlogo-hexagon
seisman May 14, 2026
3d92d32
Fix the size of the hexagon outline
seisman May 14, 2026
e1d162b
Revert "Figure.pygmtlogo: Implement the hexagonal logo"
seisman May 14, 2026
1e12935
Merge branch 'pygmtlogo-wordmark-vertical' into pygmtlogo-hexagon
seisman May 14, 2026
3fdfb56
Figure.pygmtlogo: Parameterize existing tests
seisman May 14, 2026
b29bdc9
Remove two dvc files
seisman May 14, 2026
b4e1e38
Rename test_pygmtlogo_no_wordmark to test_pygmtlogo_wordmark_none
seisman May 14, 2026
e5f0af1
Merge branch 'pygmtlogo-parameterize' into pygmtlogo-font
seisman May 14, 2026
089d334
Remove one unused dvc file
seisman May 14, 2026
645ec10
Fix a typo
seisman May 14, 2026
678dabe
Merge branch 'pygmtlogo' into pygmtlogo-font
seisman May 14, 2026
afd9669
Merge branch 'pygmtlogo-font' into pygmtlogo-wordmark-vertical
seisman May 14, 2026
d47cda6
Update tests and baseline images
seisman May 14, 2026
166f2ef
Update baseline image for logo design
seisman May 14, 2026
bd0f483
Merge branch 'pygmtlogo-wordmark-vertical' into pygmtlogo-hexagon
seisman May 14, 2026
2f12fc5
Add baseline images for hexagonal logo
seisman May 14, 2026
c8c8c88
Merge branch 'pygmtlogo' into pygmtlogo-font
seisman May 23, 2026
05c862b
Merge branch 'pygmtlogo-font' into pygmtlogo-wordmark-vertical
seisman May 23, 2026
d1e37f3
Merge branch 'pygmtlogo' into pygmtlogo-font
seisman Jun 6, 2026
09060f7
Merge branch 'pygmtlogo-font' into pygmtlogo-wordmark-vertical
seisman Jun 6, 2026
17da67d
Merge branch 'pygmtlogo' into pygmtlogo-wordmark-vertical
seisman Jun 10, 2026
4efe98f
Fix the center of the wordmark to -5.5
seisman Jun 10, 2026
f23068c
Merge branch 'pygmtlogo-wordmark-vertical' into pygmtlogo-hexagon
seisman Jun 11, 2026
da702ea
Merge branch 'pygmtlogo-wordmark-vertical' into pygmtlogo-hexagon
seisman Jun 11, 2026
0b493a2
Adjust the wordmark position for vertical hexagonal logo
seisman Jun 11, 2026
4a60e55
Merge branch 'pygmtlogo' into pygmtlogo-hexagon
seisman Jun 16, 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
6 changes: 3 additions & 3 deletions pygmt/src/pygmtlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _create_logo( # noqa: PLR0915
hex_factor = 1.0
case "hexagon":
symbol = "h"
size_shape = (r0 + 0.34) * 2
size_shape = (r0 + r1) / np.cos(np.deg2rad(30))
hex_factor = 1.1

# Define wordmark
Expand All @@ -93,7 +93,7 @@ def _create_logo( # noqa: PLR0915
fontsize = size * 2.0 / pygmtwidth
args_wordmark = {
"x": -size - fontsize * plsb,
"y": -size * 1.375, # Center of the wordmark.
"y": -size * (1.375 if shape == "circle" else 1.5),
"justify": "ML",
"font": f"{fontsize}c,{font}",
"no_clip": True, # Needed because x<xmin.
Expand Down Expand Up @@ -266,7 +266,7 @@ def _compass_lines():
halfheight = pheight / 2.0 * fontsize
fig.hlines(y=[-halfheight, halfheight], xmin=size, pen=pen)
fig.vlines(x=[size * 1.25, size * 1.25 + pstroke * fontsize], pen=pen)
elif wordmark == "vertical":
elif wordmark == "vertical" and shape == "circle":
fig.hlines(y=-size * 1.375, pen=pen)

if figname:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: 1ab652c5ba076ee29a0c1c1c336bf281
size: 357515
hash: md5
path: test_pygmtlogo_design_hexagon-horizontal.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: c917b7e40da71eed0e05a8525ddc2e56
size: 196043
hash: md5
path: test_pygmtlogo_design_hexagon-vertical.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: a2af1063edc39f78976bce5a6ff76bef
size: 55897
hash: md5
path: test_pygmtlogo_wordmark_horizontal_hexagon.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: f821a40456a61abe7859685cc90080a9
size: 28794
hash: md5
path: test_pygmtlogo_wordmark_none_hexagon.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
outs:
- md5: 56740518206c886f12656a31a953b003
size: 37585
hash: md5
path: test_pygmtlogo_wordmark_vertical_hexagon.png
8 changes: 4 additions & 4 deletions pygmt/tests/test_pygmtlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

@pytest.mark.mpl_image_compare(savefig_kwargs={"dpi": 600})
@pytest.mark.parametrize("wordmark", ["horizontal", "vertical"])
@pytest.mark.parametrize("shape", ["circle"])
@pytest.mark.parametrize("shape", ["circle", "hexagon"])
def test_pygmtlogo_design(shape, wordmark):
"""
Test the design details of the PyGMT logo with a wordmark.
Expand All @@ -24,7 +24,7 @@ def test_pygmtlogo_design(shape, wordmark):


@pytest.mark.mpl_image_compare
@pytest.mark.parametrize("shape", ["circle"])
@pytest.mark.parametrize("shape", ["circle", "hexagon"])
def test_pygmtlogo_wordmark_none(shape):
"""
Test the PyGMT logo without the wordmark, including both light/dark themes, and
Expand Down Expand Up @@ -52,7 +52,7 @@ def test_pygmtlogo_wordmark_none(shape):


@pytest.mark.mpl_image_compare
@pytest.mark.parametrize("shape", ["circle"])
@pytest.mark.parametrize("shape", ["circle", "hexagon"])
def test_pygmtlogo_wordmark_horizontal(shape):
"""
Test the PyGMT logo with a horizontal wordmark, including both light/dark themes,
Expand Down Expand Up @@ -81,7 +81,7 @@ def test_pygmtlogo_wordmark_horizontal(shape):


@pytest.mark.mpl_image_compare
@pytest.mark.parametrize("shape", ["circle"])
@pytest.mark.parametrize("shape", ["circle", "hexagon"])
def test_pygmtlogo_wordmark_vertical(shape):
"""
Test the PyGMT logo with a vertical wordmark, including both light/dark themes,
Expand Down
Loading