Skip to content

Commit 6c4a365

Browse files
committed
Fix the size of the hexagon outline
1 parent 822c6de commit 6c4a365

1 file changed

Lines changed: 3 additions & 5 deletions

File tree

pygmt/src/pygmtlogo.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,11 +72,9 @@ def _create_logo( # noqa: PLR0915
7272
case "circle":
7373
symbol = "c"
7474
size_shape = r0 + r1
75-
hex_factor = 1.0
7675
case "hexagon":
7776
symbol = "h"
78-
size_shape = (r0 + 0.34) * 2
79-
hex_factor = 1.1
77+
size_shape = (r0 + r1) / np.cos(np.deg2rad(30))
8078

8179
# Define wordmark
8280
font = "AvantGarde-Book"
@@ -174,8 +172,8 @@ def _compass_lines():
174172
y1, y2, y3 = r0 * cosx, r3 * cosx, (r2 + (r3 - r4)) * cosx
175173
# Coordinates of vectors in the format of (x_start, y_start, x_end, y_end).
176174
return [
177-
(-r0 * hex_factor, 0, -r3, 0), # left horizontal
178-
(r3, 0, r0 * hex_factor, 0), # right horizontal
175+
(-r0, 0, -r3, 0), # left horizontal
176+
(r3, 0, r0, 0), # right horizontal
179177
(-x1, y1, -x2, y2), # upper left
180178
(-x1, -y1, -x2, -y2), # lower left
181179
(x1, y1, x3, y3), # upper right

0 commit comments

Comments
 (0)