Uh oh!
There was an error while loading. Please reload this page.
Figure.pygmtlogo: Force the default logo size to 2-cm and rename test_pygmtlogo to test_pygmtlogo_circle_no_wordmark - #4617
Conversation
| @pytest.mark.benchmark | ||
| @pytest.mark.mpl_image_compare | ||
| def test_pygmtlogo(): | ||
| def test_pygmtlogo_circle_no_wordmark(): |
There was a problem hiding this comment.
Other tests will be named like
test_pygmtlogo_circle_horizontal_wordmarktest_pygmtlogo_circle_vertical_wordmarktest_pygmtlogo_hexagon_no_wordmarktest_pygmtlogo_hexagon_horizontal_wordmarktest_pygmtlogo_hexagon_vertical_wordmark
| ) | ||
| fig.pygmtlogo( | ||
| position=Position((4, 1), anchor="CM", cstype="mapcoords"), theme="dark" | ||
| ) |
There was a problem hiding this comment.
Plan to add the two black-and-white logos below the colored versions in later PRs.
Summary of changed imagesThis is an auto-generated report of images that have changed on the DVC remote
Image diff(s)Report last updated at commit aafb290 |
seisman
commented
May 2, 2026
seisman
commented
May 3, 2026
From the |
Thanks for potting out this parameter, I did not know about it and that it affects the Currently we have size=4region= [-size, size] *2# -> 8 plot-unitsproj="x1c"# -> 1 cm per plot-unitswith By only adding the logo image in EPS format (without a basemap) and using -V we can manually find out the width and hight after applying importpygmtfig=pygmt.Figure()
fig.image(imagefile="pygmt_logo_saved_external.eps") # Logo is circle; use no basemap fig.show(V=True)
So we could either adjust
Not sure if this is an ideal solution. |
seisman
commented
May 4, 2026
I've rounded |
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Yvonne Fröhlich <94163266+yvonnefroehlich@users.noreply.github.com>
seisman
commented
May 6, 2026
Actually I feel this is not a good idea, since the actual size still depends on the GMT_GRAPHICS_DPU setting. Users would be surprised to see that GMT_GRAPHICS_DPU can affect the size of the default PyGMT logo size. I think the best solution is still to set the default logo size to 2-cm. |
yvonnefroehlich
commented
May 6, 2026
I am fine with both ways. |
seisman
commented
May 6, 2026
Then I guess this PR can be approved and merged, right? |
yvonnefroehlich
commented
May 6, 2026
Yes, sure. Sorry, did not see that you already changed code and docs. |
Uh oh!
There was an error while loading. Please reload this page.





As shown in the table in PR #4616, we will likely have 24 PyGMT logo variants. Maintaining 24 separate baseline images is impractical, so we plan to group multiple variants into a single test. A reasonable approach is to define six tests based on logo shape and wordmark configuration. Each test would include four variants: colored and black-and-white logos in both light and dark themes.
This PR renames the existing test from test_pygmtlogo (which is too general) to test_pygmtlogo_circle_no_wordmark. It also adds a basemap to make the default logo size easier to inspect.
It appears that the default width/height of the logos is slightly smaller than 2 cm, although I am not sure why this value is used.