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
11 changes: 0 additions & 11 deletions pygmt/src/pygmtlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,17 +216,6 @@ def _compass_lines():
# Upper vertical line
fig.plot(data=_vline_coords(), fill=red, perspective=True)

# Outline around the shape for black and white color with dark theme
if not color and theme == "dark":
fig.plot(
x=0,
y=0,
style=f"{symbol}{size_shape + thick_shape}c",
pen=f"{thick_comp / 2.0}c,{color_bg}",
perspective=True,
no_clip=True,
)

# Add wordmark "PyGMT"
if wordmark != "none":
fig.text(text=f"@;{color_py};Py@;;@;{color_gmt};GMT@;;", **args_text_wm)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
outs:
- md5: 781ac55a32194d2818a1d96ab2d32727
size: 31485
- md5: fdc90d2867bcbc096bcf5a9303d15ddf
size: 31962
hash: md5
path: test_pygmtlogo_circle_no_wordmark.png
35 changes: 16 additions & 19 deletions pygmt/tests/test_pygmtlogo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest
from pygmt import Figure
from pygmt.params import Axis, Position
from pygmt.params import Axis, Frame, Position
from pygmt.src.pygmtlogo import _create_logo


Expand All @@ -29,23 +29,20 @@ def test_pygmtlogo_circle_no_wordmark():
and colored/black-and-white versions.
"""
fig = Figure()
fig.basemap(region=[-0.5, 5.0, -0.5, 5.0], projection="x1c", frame=Axis(grid=0.5))
fig.pygmtlogo(
position=Position((1, 3.5), anchor="CM", cstype="mapcoords"),
theme="light",
)
fig.pygmtlogo(
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,
fig.basemap(
region=[-0.5, 5.0, -0.5, 5.0],
projection="x1c",
frame=Frame(fill="gray", axis=Axis(grid=0.5)),
)
for (x, y), theme, color in [
((1.0, 3.5), "light", True),
((3.5, 3.5), "dark", True),
((1.0, 1.0), "light", False),
((3.5, 1.0), "dark", False),
]:
fig.pygmtlogo(
position=Position((x, y), anchor="CM", cstype="mapcoords"),
theme=theme,
color=color,
)
return fig
Loading