Skip to content

Commit b8d9e8c

Browse files
Get ride of the xshift for letter M
1 parent e0ede2e commit b8d9e8c

File tree

1 file changed

+17
-20
lines changed

1 file changed

+17
-20
lines changed

pygmt/src/pygmtlogo.py

Lines changed: 17 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
from pathlib import Path
88

9-
import numpy as np # get ride of the x shift for letter M
109
import pygmt
1110

1211

@@ -169,24 +168,22 @@ def create_logo(color=True, theme="light", shape="circle", wordmark=True): # no
169168
# polygon with small distance to horizontal line of letter G
170169
# starting point: lower right corner of the left vertical line of letter M
171170
# direction: clockwise
172-
m_x1 = 0.35
173-
m_x2 = 1.52
174-
m_x = np.array(
175-
[
176-
m_x1 + m_x1 / 2, # vertical left upwarts
177-
m_x1 - m_x1 / 2,
178-
m_x1 - m_x1 / 2,
179-
m_x1 + m_x1 / 2,
180-
(m_x2 + m_x1 / 2) / 2 + m_x1 / 4, # mid pick above
181-
m_x2 - m_x1 / 2, # vertical right downwarts
182-
m_x2 + m_x1 / 2,
183-
m_x2 + m_x1 / 2,
184-
m_x2 - m_x1 / 2,
185-
m_x2 - m_x1 / 2, # right pick below
186-
(m_x2 + m_x1 / 2) / 2 + m_x1 / 4, # mid pick below
187-
m_x1 + m_x1 / 2, # left pick below
188-
]
189-
) # get ride of the x shift
171+
m_x1 = 0.35 - 0.35 / 2 - 0.06
172+
m_x2 = 1.52 + 0.35 / 2 - 0.06
173+
m_x = [
174+
m_x1 + m_x2 / 5, # vertical left upwarts
175+
m_x1,
176+
m_x1,
177+
m_x1 + m_x2 / 5,
178+
m_x1 + (m_x2 - m_x1) / 2, # mid pick above
179+
m_x2 - m_x2 / 5, # vertical right downwarts
180+
m_x2,
181+
m_x2,
182+
m_x2 - m_x2 / 5,
183+
m_x2 - m_x2 / 5, # right pick below
184+
m_x1 + (m_x2 - m_x1) / 2, # mid pick below
185+
m_x1 + m_x2 / 5, # left pick below
186+
]
190187
m_y1 = 0.3
191188
m_y2 = 1.63
192189
m_y = [
@@ -203,7 +200,7 @@ def create_logo(color=True, theme="light", shape="circle", wordmark=True): # no
203200
m_y2 - m_y2 / 2 - m_y2 / 18, # mid pick below
204201
m_y2 - m_y2 / 3, # left pick below
205202
]
206-
fig.plot(x=m_x - 0.06, y=m_y, close=True, fill=color_red) # get ride of the x shift
203+
fig.plot(x=m_x, y=m_y, close=True, fill=color_red)
207204

208205
# .............................................................................
209206
# letter T

0 commit comments

Comments
 (0)