Skip to content

Commit 1ea6e8e

Browse files
authored
Figure.pygmtlogo: Remove the additional black outline for the black-and-white dark-theme logo (#4638)
1 parent 71f66dd commit 1ea6e8e

3 files changed

Lines changed: 18 additions & 32 deletions

File tree

pygmt/src/pygmtlogo.py

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,6 @@ def _compass_lines():
216216
# Upper vertical line
217217
fig.plot(data=_vline_coords(), fill=red, perspective=True)
218218

219-
# Outline around the shape for black and white color with dark theme
220-
if not color and theme == "dark":
221-
fig.plot(
222-
x=0,
223-
y=0,
224-
style=f"{symbol}{size_shape + thick_shape}c",
225-
pen=f"{thick_comp / 2.0}c,{color_bg}",
226-
perspective=True,
227-
no_clip=True,
228-
)
229-
230219
# Add wordmark "PyGMT"
231220
if wordmark != "none":
232221
fig.text(text=f"@;{color_py};Py@;;@;{color_gmt};GMT@;;", **args_text_wm)
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
outs:
2-
- md5: 781ac55a32194d2818a1d96ab2d32727
3-
size: 31485
2+
- md5: fdc90d2867bcbc096bcf5a9303d15ddf
3+
size: 31962
44
hash: md5
55
path: test_pygmtlogo_circle_no_wordmark.png

pygmt/tests/test_pygmtlogo.py

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import pytest
66
from pygmt import Figure
7-
from pygmt.params import Axis, Position
7+
from pygmt.params import Axis, Frame, Position
88
from pygmt.src.pygmtlogo import _create_logo
99

1010

@@ -29,23 +29,20 @@ def test_pygmtlogo_circle_no_wordmark():
2929
and colored/black-and-white versions.
3030
"""
3131
fig = Figure()
32-
fig.basemap(region=[-0.5, 5.0, -0.5, 5.0], projection="x1c", frame=Axis(grid=0.5))
33-
fig.pygmtlogo(
34-
position=Position((1, 3.5), anchor="CM", cstype="mapcoords"),
35-
theme="light",
36-
)
37-
fig.pygmtlogo(
38-
position=Position((3.5, 3.5), anchor="CM", cstype="mapcoords"),
39-
theme="dark",
40-
)
41-
fig.pygmtlogo(
42-
position=Position((1, 1), anchor="CM", cstype="mapcoords"),
43-
theme="light",
44-
color=False,
45-
)
46-
fig.pygmtlogo(
47-
position=Position((3.5, 1), anchor="CM", cstype="mapcoords"),
48-
theme="dark",
49-
color=False,
32+
fig.basemap(
33+
region=[-0.5, 5.0, -0.5, 5.0],
34+
projection="x1c",
35+
frame=Frame(fill="gray", axis=Axis(grid=0.5)),
5036
)
37+
for (x, y), theme, color in [
38+
((1.0, 3.5), "light", True),
39+
((3.5, 3.5), "dark", True),
40+
((1.0, 1.0), "light", False),
41+
((3.5, 1.0), "dark", False),
42+
]:
43+
fig.pygmtlogo(
44+
position=Position((x, y), anchor="CM", cstype="mapcoords"),
45+
theme=theme,
46+
color=color,
47+
)
5148
return fig

0 commit comments

Comments
 (0)