From 88f381a4e6009d4d0b4390871e7c5da028cbed46 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 7 May 2026 18:24:15 +0800 Subject: [PATCH 01/15] Allow adjust font --- pygmt/src/pygmtlogo.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index e9351b0edad..5965bb47a2a 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -22,6 +22,7 @@ def _create_logo( # noqa: PLR0915, PLR0912 theme: Literal["light", "dark"] = "light", wordmark: Literal["none", "horizontal", "vertical"] = "none", color: bool = True, + font: str | None = None, figname: PathLike | None = None, debug: bool = False, ): @@ -81,7 +82,7 @@ def _create_logo( # noqa: PLR0915, PLR0912 hex_factor = 1.1 # Define wordmark - font = "AvantGarde-Book" + # font = "AvantGarde-Book" match wordmark: case "vertical": args_text_wm = {"x": 0, "y": -4.5, "justify": "CT", "font": f"2.5c,{font}"} @@ -259,6 +260,7 @@ def pygmtlogo( # noqa: PLR0913 shape: Literal["circle", "hexagon"] = "circle", theme: Literal["light", "dark"] = "light", wordmark: Literal["none", "horizontal", "vertical"] = "none", + font: str | None = None, color: bool = True, width: float | str | None = None, height: float | str | None = None, @@ -359,6 +361,7 @@ def pygmtlogo( # noqa: PLR0913 theme=theme, shape=shape, wordmark=wordmark, + font=font, figname=logofile.name, ) From 7b9f053b2434fe167da5b161af83862e30829fac Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 12 May 2026 23:19:13 +0800 Subject: [PATCH 02/15] Revert "Allow adjust font" This reverts commit 88f381a4e6009d4d0b4390871e7c5da028cbed46. --- pygmt/src/pygmtlogo.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index a1dd5b10fad..ec1bb7d9250 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -22,7 +22,6 @@ def _create_logo( # noqa: PLR0915 theme: Literal["light", "dark"] = "light", wordmark: Literal["none", "horizontal", "vertical"] = "none", color: bool = True, - font: str | None = None, figname: PathLike | None = None, debug: bool = False, ): @@ -80,7 +79,7 @@ def _create_logo( # noqa: PLR0915 hex_factor = 1.1 # Define wordmark - # font = "AvantGarde-Book" + font = "AvantGarde-Book" match wordmark: case "vertical": args_text_wm = {"x": 0, "y": -4.5, "justify": "CT", "font": f"2.4c,{font}"} @@ -262,7 +261,6 @@ def pygmtlogo( # noqa: PLR0913 shape: Literal["circle", "hexagon"] = "circle", theme: Literal["light", "dark"] = "light", wordmark: Literal["none", "horizontal", "vertical"] = "none", - font: str | None = None, color: bool = True, width: float | str | None = None, height: float | str | None = None, @@ -363,7 +361,6 @@ def pygmtlogo( # noqa: PLR0913 theme=theme, shape=shape, wordmark=wordmark, - font=font, figname=logofile.name, ) From 6cdbc34ffdf095b74d0543c1b1ccaa30b6b89c25 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 13 May 2026 14:10:35 +0800 Subject: [PATCH 03/15] Figure.pygmtlogo: Accurate positioning of the horizontal wordmark --- pygmt/src/pygmtlogo.py | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index ec1bb7d9250..6ec19815579 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -79,12 +79,27 @@ def _create_logo( # noqa: PLR0915 hex_factor = 1.1 # Define wordmark + # See https://github.com/GenericMappingTools/pygmt/pull/4627#issuecomment-4437317011 + # for the rationale behind the magic values. font = "AvantGarde-Book" + plsb = 0.076 # Left side bearing of the font for letter "P" + pstroke = 0.0735 # Stroke with of the font for letter "P" + pheight = 0.739 # Height of the font for letter "P" + match wordmark: case "vertical": - args_text_wm = {"x": 0, "y": -4.5, "justify": "CT", "font": f"2.4c,{font}"} + args_wordmark = {"x": 0, "y": -4.5, "justify": "CT", "font": f"2.4c,{font}"} case "horizontal": - args_text_wm = {"x": 4.5, "y": 0.8, "justify": "LM", "font": f"8c,{font}"} + # The stroke width matches the outline thickness. + # The left edge of "P" is aligned at y=size * 1.25. + # Letters "PGMT" are placed vertically centered at y=0. + fontsize = thick_shape / pstroke + args_wordmark = { + "x": size * 1.25 - plsb * fontsize, + "y": -pheight / 2.0 * fontsize, + "justify": "BL", + "font": f"{fontsize}c,{font}", + } def _letter_g_coords(): """Coordinates for letter G.""" @@ -229,7 +244,7 @@ def _compass_lines(): # Add wordmark "PyGMT" if wordmark != "none": - fig.text(text=f"@;{color_py};Py@;;@;{color_gmt};GMT@;;", **args_text_wm) + fig.text(text=f"@;{color_py};Py@;;@;{color_gmt};GMT@;", **args_wordmark) # Helpful for implementing the logo; not included in the logo if debug: From a8330fd286f9047c93469b47b1f93d95a9b9347b Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 13 May 2026 14:11:30 +0800 Subject: [PATCH 04/15] Add debugging lines for horizontal wordmark --- pygmt/src/pygmtlogo.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index 6ec19815579..467db051bc2 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -263,6 +263,11 @@ def _compass_lines(): fig.hlines(y=[r4, r5], xmin=-size_s, xmax=size_s, pen=pen, perspective=True) m_mid = (thick_gap + r4) / 2 fig.vlines(x=[r4, m_mid], ymin=-size_s, ymax=size_s, pen=pen, perspective=True) + # Lines for wordmark + if wordmark == "horizontal": + 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) if figname: fig.savefig(fname=figname) From f03bd5006cf79f80dde2be6549302a2d53901c77 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 13 May 2026 14:11:42 +0800 Subject: [PATCH 05/15] Smaller region for horizontal wordmark --- pygmt/src/pygmtlogo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index 467db051bc2..1a182038097 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -34,7 +34,7 @@ def _create_logo( # noqa: PLR0915 size = 4 proj = "x1c" region = { - "horizontal": [-size, size * 8.0, -size, size], + "horizontal": [-size, size * 7.0, -size, size], "vertical": [-size, size, -size * 1.75, size], "none": [-size, size, -size, size], }[wordmark] From 479cb58daf8d2be72af19ebc63dcb654695b316f Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 13 May 2026 14:13:00 +0800 Subject: [PATCH 06/15] Update the baseline image for horizontal wordmark design --- .../baseline/test_pygmtlogo_circle_design_horizontal.png.dvc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc index 3648ff8045d..9095a7fbc48 100644 --- a/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc +++ b/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc @@ -1,5 +1,5 @@ outs: -- md5: de3f281a09815faff7fed339c1635bc5 - size: 336254 +- md5: 44a9a200fbac4c868b69cb1c13e6dfc5 + size: 320394 hash: md5 path: test_pygmtlogo_circle_design_horizontal.png From 3f9affe083bca950c743f6f9f3520b4eb08e52f9 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 13 May 2026 17:01:24 +0800 Subject: [PATCH 07/15] Reorder variables --- pygmt/src/pygmtlogo.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index 1a182038097..e8cfc7fa643 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -82,9 +82,9 @@ def _create_logo( # noqa: PLR0915 # See https://github.com/GenericMappingTools/pygmt/pull/4627#issuecomment-4437317011 # for the rationale behind the magic values. font = "AvantGarde-Book" - plsb = 0.076 # Left side bearing of the font for letter "P" - pstroke = 0.0735 # Stroke with of the font for letter "P" - pheight = 0.739 # Height of the font for letter "P" + pheight = 0.739 # Height of letter "P" + plsb = 0.076 # Left side bearing of letter "P" + pstroke = 0.0735 # Stroke thickness of letter "P" match wordmark: case "vertical": From be6c052274e130365fc6496c40bbf759e167a42e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 13 May 2026 17:46:40 +0800 Subject: [PATCH 08/15] Add a test and baseline image for circular logo with horizontal wordmark --- ...gmtlogo_circle_horizontal_wordmark.png.dvc | 5 +++ pygmt/tests/test_pygmtlogo.py | 39 ++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) create mode 100644 pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc new file mode 100644 index 00000000000..bf1e1bb0b02 --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 6510d43c7860d79f4c4dc43e6b784325 + size: 64867 + hash: md5 + path: test_pygmtlogo_circle_horizontal_wordmark.png diff --git a/pygmt/tests/test_pygmtlogo.py b/pygmt/tests/test_pygmtlogo.py index 71078f95548..0b61d88eea3 100644 --- a/pygmt/tests/test_pygmtlogo.py +++ b/pygmt/tests/test_pygmtlogo.py @@ -4,7 +4,7 @@ import pytest from pygmt import Figure -from pygmt.params import Axis, Position +from pygmt.params import Axis, Frame, Position from pygmt.src.pygmtlogo import _create_logo @@ -49,3 +49,40 @@ def test_pygmtlogo_circle_no_wordmark(): color=False, ) return fig + + +@pytest.mark.mpl_image_compare +def test_pygmtlogo_circle_horizontal_wordmark(): + """ + Test the PyGMT circular logo with a horizontal wordmark, including both light/dark + themes, and colored/black-and-white versions. + """ + fig = Figure() + fig.basemap( + region=[-0.5, 8.0, -0.5, 10.0], + projection="x1c", + frame=Frame(fill="gray", axis=Axis(grid=0.5)), + ) + fig.pygmtlogo( + position=Position((0, 8.5), anchor="ML", cstype="mapcoords"), + theme="light", + wordmark="horizontal", + ) + fig.pygmtlogo( + position=Position((0, 6), anchor="ML", cstype="mapcoords"), + theme="dark", + wordmark="horizontal", + ) + fig.pygmtlogo( + position=Position((0, 3.5), anchor="ML", cstype="mapcoords"), + theme="light", + color=False, + wordmark="horizontal", + ) + fig.pygmtlogo( + position=Position((0, 1), anchor="ML", cstype="mapcoords"), + theme="dark", + color=False, + wordmark="horizontal", + ) + return fig From 6988c0fc7e01d239f37a349e1f1670c89ce7f937 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 09:37:29 +0800 Subject: [PATCH 09/15] Update baseline images --- .../test_pygmtlogo_circle_horizontal_wordmark.png.dvc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc index bf1e1bb0b02..e51fb2a3d8e 100644 --- a/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc +++ b/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc @@ -1,5 +1,5 @@ outs: -- md5: 6510d43c7860d79f4c4dc43e6b784325 - size: 64867 +- md5: 5d53d424df8cbf68f04240bfee992c15 + size: 63949 hash: md5 path: test_pygmtlogo_circle_horizontal_wordmark.png From f6d08a0936e16b48c13c5936f6d9acc16664a342 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 09:55:17 +0800 Subject: [PATCH 10/15] Simplify the test script --- pygmt/tests/test_pygmtlogo.py | 34 ++++++++++++---------------------- 1 file changed, 12 insertions(+), 22 deletions(-) diff --git a/pygmt/tests/test_pygmtlogo.py b/pygmt/tests/test_pygmtlogo.py index ee2d3b01c9e..26cd9b10947 100644 --- a/pygmt/tests/test_pygmtlogo.py +++ b/pygmt/tests/test_pygmtlogo.py @@ -60,26 +60,16 @@ def test_pygmtlogo_circle_horizontal_wordmark(): projection="x1c", frame=Frame(fill="gray", axis=Axis(grid=0.5)), ) - fig.pygmtlogo( - position=Position((0, 8.5), anchor="ML", cstype="mapcoords"), - theme="light", - wordmark="horizontal", - ) - fig.pygmtlogo( - position=Position((0, 6), anchor="ML", cstype="mapcoords"), - theme="dark", - wordmark="horizontal", - ) - fig.pygmtlogo( - position=Position((0, 3.5), anchor="ML", cstype="mapcoords"), - theme="light", - color=False, - wordmark="horizontal", - ) - fig.pygmtlogo( - position=Position((0, 1), anchor="ML", cstype="mapcoords"), - theme="dark", - color=False, - wordmark="horizontal", - ) + for (x, y), theme, color in [ + ((0, 8.5), "light", True), + ((0, 6), "dark", True), + ((0, 3.5), "light", False), + ((0, 1), "dark", False), + ]: + fig.pygmtlogo( + position=Position((x, y), anchor="ML", cstype="mapcoords"), + theme=theme, + color=color, + wordmark="horizontal", + ) return fig From 3fdfb565f226c85a122bc8dd28e5580b9b57d911 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 12:13:19 +0800 Subject: [PATCH 11/15] Figure.pygmtlogo: Parameterize existing tests --- ...t_pygmtlogo_design_circle-horizontal.png.dvc | 5 +++++ ...est_pygmtlogo_design_circle-vertical.png.dvc | 5 +++++ ...> test_pygmtlogo_no_wordmark_circle.png.dvc} | 2 +- pygmt/tests/test_pygmtlogo.py | 17 ++++++++++------- 4 files changed, 21 insertions(+), 8 deletions(-) create mode 100644 pygmt/tests/baseline/test_pygmtlogo_design_circle-horizontal.png.dvc create mode 100644 pygmt/tests/baseline/test_pygmtlogo_design_circle-vertical.png.dvc rename pygmt/tests/baseline/{test_pygmtlogo_circle_no_wordmark.png.dvc => test_pygmtlogo_no_wordmark_circle.png.dvc} (61%) diff --git a/pygmt/tests/baseline/test_pygmtlogo_design_circle-horizontal.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_design_circle-horizontal.png.dvc new file mode 100644 index 00000000000..55cb442316c --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_design_circle-horizontal.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 8924c7d80afcc92df4e77e6856b553a4 + size: 336254 + hash: md5 + path: test_pygmtlogo_design_circle-horizontal.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_design_circle-vertical.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_design_circle-vertical.png.dvc new file mode 100644 index 00000000000..ec88138185f --- /dev/null +++ b/pygmt/tests/baseline/test_pygmtlogo_design_circle-vertical.png.dvc @@ -0,0 +1,5 @@ +outs: +- md5: 5ee82660f20bc8424f3051af4f9fb9ac + size: 173671 + hash: md5 + path: test_pygmtlogo_design_circle-vertical.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_no_wordmark.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_no_wordmark_circle.png.dvc similarity index 61% rename from pygmt/tests/baseline/test_pygmtlogo_circle_no_wordmark.png.dvc rename to pygmt/tests/baseline/test_pygmtlogo_no_wordmark_circle.png.dvc index ad21905884e..05507c48df6 100644 --- a/pygmt/tests/baseline/test_pygmtlogo_circle_no_wordmark.png.dvc +++ b/pygmt/tests/baseline/test_pygmtlogo_no_wordmark_circle.png.dvc @@ -2,4 +2,4 @@ outs: - md5: fdc90d2867bcbc096bcf5a9303d15ddf size: 31962 hash: md5 - path: test_pygmtlogo_circle_no_wordmark.png + path: test_pygmtlogo_no_wordmark_circle.png diff --git a/pygmt/tests/test_pygmtlogo.py b/pygmt/tests/test_pygmtlogo.py index 4db0dc05b84..5836887e9cb 100644 --- a/pygmt/tests/test_pygmtlogo.py +++ b/pygmt/tests/test_pygmtlogo.py @@ -10,23 +10,25 @@ @pytest.mark.mpl_image_compare(savefig_kwargs={"dpi": 600}) @pytest.mark.parametrize("wordmark", ["horizontal", "vertical"]) -def test_pygmtlogo_circle_design(wordmark): +@pytest.mark.parametrize("shape", ["circle"]) +def test_pygmtlogo_design(shape, wordmark): """ - Test the design details of the PyGMT circular logo, with a wordmark. + Test the design details of the PyGMT logo with a wordmark. This is a regression test to ensure that the design of the logo does not change unintentionally. The debugging lines (gridlines and circles) are helpful for implementing the logo, but they are not included in the final logo design. """ - fig = _create_logo(debug=True, wordmark=wordmark) + fig = _create_logo(debug=True, shape=shape, wordmark=wordmark) return fig @pytest.mark.mpl_image_compare -def test_pygmtlogo_circle_no_wordmark(): +@pytest.mark.parametrize("shape", ["circle"]) +def test_pygmtlogo_no_wordmark(shape): """ - Test the PyGMT circular logo without the wordmark, including both light/dark themes, - and colored/black-and-white versions. + Test the PyGMT logo without the wordmark, including both light/dark themes, and + colored/black-and-white versions. """ fig = Figure() fig.basemap( @@ -41,8 +43,9 @@ def test_pygmtlogo_circle_no_wordmark(): ((3.5, 1.0), "dark", False), ]: fig.pygmtlogo( - position=Position((x, y), anchor="CM", cstype="mapcoords"), + position=Position((x, y), anchor="MC", cstype="mapcoords"), theme=theme, color=color, + shape=shape, ) return fig From b29bdc991fba20a4b111c102aafb1dbcc644638d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 12:57:35 +0800 Subject: [PATCH 12/15] Remove two dvc files --- .../baseline/test_pygmtlogo_circle_design_horizontal.png.dvc | 5 ----- .../baseline/test_pygmtlogo_circle_design_vertical.png.dvc | 5 ----- 2 files changed, 10 deletions(-) delete mode 100644 pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc delete mode 100644 pygmt/tests/baseline/test_pygmtlogo_circle_design_vertical.png.dvc diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc deleted file mode 100644 index 3648ff8045d..00000000000 --- a/pygmt/tests/baseline/test_pygmtlogo_circle_design_horizontal.png.dvc +++ /dev/null @@ -1,5 +0,0 @@ -outs: -- md5: de3f281a09815faff7fed339c1635bc5 - size: 336254 - hash: md5 - path: test_pygmtlogo_circle_design_horizontal.png diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_design_vertical.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_circle_design_vertical.png.dvc deleted file mode 100644 index dc0b53a0cd7..00000000000 --- a/pygmt/tests/baseline/test_pygmtlogo_circle_design_vertical.png.dvc +++ /dev/null @@ -1,5 +0,0 @@ -outs: -- md5: dd09fa24c575eabac7659dc49f313f5f - size: 173671 - hash: md5 - path: test_pygmtlogo_circle_design_vertical.png From b4e1e38e6f36613550906330d777fdbacacde4f6 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 13:02:20 +0800 Subject: [PATCH 13/15] Rename test_pygmtlogo_no_wordmark to test_pygmtlogo_wordmark_none --- ...rcle.png.dvc => test_pygmtlogo_wordmark_none_circle.png.dvc} | 2 +- pygmt/tests/test_pygmtlogo.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) rename pygmt/tests/baseline/{test_pygmtlogo_no_wordmark_circle.png.dvc => test_pygmtlogo_wordmark_none_circle.png.dvc} (60%) diff --git a/pygmt/tests/baseline/test_pygmtlogo_no_wordmark_circle.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_wordmark_none_circle.png.dvc similarity index 60% rename from pygmt/tests/baseline/test_pygmtlogo_no_wordmark_circle.png.dvc rename to pygmt/tests/baseline/test_pygmtlogo_wordmark_none_circle.png.dvc index 05507c48df6..eb9140b19c1 100644 --- a/pygmt/tests/baseline/test_pygmtlogo_no_wordmark_circle.png.dvc +++ b/pygmt/tests/baseline/test_pygmtlogo_wordmark_none_circle.png.dvc @@ -2,4 +2,4 @@ outs: - md5: fdc90d2867bcbc096bcf5a9303d15ddf size: 31962 hash: md5 - path: test_pygmtlogo_no_wordmark_circle.png + path: test_pygmtlogo_wordmark_none_circle.png diff --git a/pygmt/tests/test_pygmtlogo.py b/pygmt/tests/test_pygmtlogo.py index 5836887e9cb..6280a6573b1 100644 --- a/pygmt/tests/test_pygmtlogo.py +++ b/pygmt/tests/test_pygmtlogo.py @@ -25,7 +25,7 @@ def test_pygmtlogo_design(shape, wordmark): @pytest.mark.mpl_image_compare @pytest.mark.parametrize("shape", ["circle"]) -def test_pygmtlogo_no_wordmark(shape): +def test_pygmtlogo_wordmark_none(shape): """ Test the PyGMT logo without the wordmark, including both light/dark themes, and colored/black-and-white versions. From 089d33488c96212979c26847440f88a5ebc87ba7 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 13:15:30 +0800 Subject: [PATCH 14/15] Remove one unused dvc file --- .../test_pygmtlogo_circle_horizontal_wordmark.png.dvc | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc diff --git a/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc b/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc deleted file mode 100644 index e51fb2a3d8e..00000000000 --- a/pygmt/tests/baseline/test_pygmtlogo_circle_horizontal_wordmark.png.dvc +++ /dev/null @@ -1,5 +0,0 @@ -outs: -- md5: 5d53d424df8cbf68f04240bfee992c15 - size: 63949 - hash: md5 - path: test_pygmtlogo_circle_horizontal_wordmark.png From 645ec10d9cbb36ba8cb4c44c7b1611adf7622549 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Thu, 14 May 2026 13:16:39 +0800 Subject: [PATCH 15/15] Fix a typo --- pygmt/src/pygmtlogo.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygmt/src/pygmtlogo.py b/pygmt/src/pygmtlogo.py index 56e6b13a928..b73c575cfaf 100644 --- a/pygmt/src/pygmtlogo.py +++ b/pygmt/src/pygmtlogo.py @@ -233,7 +233,7 @@ def _compass_lines(): # Add wordmark "PyGMT" if wordmark != "none": - fig.text(text=f"@;{color_py};Py@;;@;{color_gmt};GMT@;", **args_wordmark) + fig.text(text=f"@;{color_py};Py@;;@;{color_gmt};GMT@;;", **args_wordmark) # Helpful for implementing the logo; not included in the logo if debug: