Add a test to check the design details of the circular logo#4623
Add a test to check the design details of the circular logo#4623
Conversation
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 22ec372 |
| fig.vlines(x=[r4, (thick_gap + r4) / 2], ymax=3, pen=pen, perspective=True) | ||
|
|
||
| fig.savefig(fname=figname) | ||
| if figname: |
There was a problem hiding this comment.
figname default to None. If None, return the Figure instance rather than saving it.
| from pygmt import config # noqa: PLC0415 | ||
|
|
||
| # Gridlines | ||
| with config(MAP_FRAME_TYPE="inside", MAP_GRID_PEN="0.1p,gray30"): |
There was a problem hiding this comment.
MAP_FRAME_TYPE=inside is not needed because no annotations are shown
There was a problem hiding this comment.
Oh yes, I think I removed a1 or used it only locally.
| with config(MAP_FRAME_TYPE="inside", MAP_GRID_PEN="0.1p,gray30"): | ||
| fig.basemap(frame="g1") | ||
| with config(MAP_GRID_PEN="0.1p,gray30"): | ||
| fig.basemap(frame="00g1") |
There was a problem hiding this comment.
00 in 00g1 means no frame, only gridlines. The syntax is not Pythonic but I think it's fine to use it here.
There was a problem hiding this comment.
Agree, we can use here the GMT synthax. No need to make the code longer using the newly implemented Parameter classes.
| 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) |
There was a problem hiding this comment.
Use the private _create_logo function because it's the underlying function that produces the logo.
This reverts commit 56d4839.

The existing test
test_pygmtlogo_circle_no_wordmarkworks well for testing different variants of the PyGMT logos. However, the baseline image is relatively small (2-cm) and low resolution (maybe 150 dpi?), making minor logo changes difficult to detect.This PR adds a new test to verify the correctness of the circular logo, including all debugging gridlines and circles. The logo is 8 cm wide, and the baseline image is saved at 600 dpi, making the test more sensitive to subtle changes.