Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion pygmt/src/pygmtlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ def _vline_coords():
x=0,
y=0,
style=f"{symbol}{size_shape + thick_shape}c",
pen=f"1p,{color_dark}",
pen=f"{thick_comp / 2.0}c,{color_bg}",
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

color_bg is the same as color_dark in this case. I prefer not to use color_dark because it's not used after line 70.

The outline thickness 1p is not ideal, because it doesn't scale well with size. Here I set the thickness to "half of the compass line".

Below is the high-resolution version of the black/white dark logo.

Image

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But wait maybe better to use thick_gap here for consistency.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
pen=f"{thick_comp / 2.0}c,{color_bg}",
pen=f"{thick_gap}c,{color_bg}",

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thick_gap controls the spacing between letter M and G. It is noticeably thicker than the gaps surrounding the vertical red bar at the top.

Currently, thick_comp = thick_shape/3 and thick_gap=thick_shape/4. Actually, I'm thinking about if we should set thick_gap to thick_comp / 2.0.

thick_gap=thick_shape/3 thick_gap = thick_comp/2.0
logo1 logo2

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thick_gap controls the spacing between letter M and G. It is noticeably thicker than the gaps surrounding the vertical red bar at the top.

I am sorry, the / 2.0 is still needed.
What I like is that the thickness of this outline is identical to the gap between the red line and red arrowhead and the blue shape.

Currently, thick_comp = thick_shape/3 and thick_gap=thick_shape/4. Actually, I'm thinking about if we should set thick_gap to thick_comp / 2.0.

I believe (did not search in the initial PR) we had thick_gap = thick_comp / 2.0 at the beginning, and I increased the value to make sure the gap between the letters G and M is still clearly visible for a small size of the logo.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I like is that the thickness of this outline is identical to the gap between the red line and red arrowhead and the blue shape.

This gap between the red line and the blue shape is exactly thick_comp / 2.0, not thick_gap.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I increased the value to make sure the gap between the letters G and M is still clearly visible for a small size of the logo.

It makes sense.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I like is that the thickness of this outline is identical to the gap between the red line and red arrowhead and the blue shape.

This gap between the red line and the blue shape is exactly thick_comp / 2.0, not thick_gap.

OK. Then it should be fine 🙂. Seems like I confused myself with this radii.

perspective=True,
no_clip=True,
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: b1dee02932b292335cf5f8b95676a258
size: 19161
- md5: dcb54b2c28e02c4fc83d38278b2700c6
size: 31454
hash: md5
path: test_pygmtlogo_circle_no_wordmark.png
10 changes: 10 additions & 0 deletions pygmt/tests/test_pygmtlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,14 @@ def test_pygmtlogo_circle_no_wordmark():
position=Position((3.5, 3.5), anchor="CM", cstype="mapcoords"),
theme="dark",
)
fig.pygmtlogo(
position=Position((1, 1), anchor="CM", cstype="mapcoords"),
theme="light",
color=False,
)
fig.pygmtlogo(
position=Position((3.5, 1), anchor="CM", cstype="mapcoords"),
theme="dark",
color=False,
)
return fig
Loading