Rename test_pygmtlogo function to test_pygmtlogo_circle_no_wordmark and improve it#4617
Rename test_pygmtlogo function to test_pygmtlogo_circle_no_wordmark and improve it#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 de990cc |
|
From the |
Thanks for potting out this parameter, I did not know about it and that it affects the Currently we have size = 4
region = [-size, size] * 2 # -> 8 plot-units
proj = "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 import pygmt
fig = 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. |





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.