|
6 | 6 |
|
7 | 7 | from pathlib import Path
|
8 | 8 |
|
| 9 | +import numpy as np # get ride of the x shift for letter M |
9 | 10 | import pygmt
|
10 | 11 |
|
11 | 12 |
|
@@ -164,17 +165,45 @@ def create_logo(color=True, theme="light", shape="circle", wordmark=True): # no
|
164 | 165 | # space between letter M and yellow line at the right side
|
165 | 166 | # fig.plot(x=[1.6, 1.6], y=[1.5, 1.775], pen=f"10p,{color_bg}")
|
166 | 167 | fig.plot(x=[1.6, 1.6], y=[1.5, 2.0], pen=f"10p,{color_bg}", perspective=True)
|
167 |
| - # lines with small distance to horizontal line of letter G |
168 |
| - lines_m = [ |
169 |
| - ([0.33, 0.90], [1.527, 1.00]), # diagonal left |
170 |
| - ([0.90, 1.43], [1.00, 1.527]), # diagonal right |
171 |
| - ([0.285, 0.285], [0.30, 1.65]), # vertical left |
172 |
| - ([1.47, 1.47], [0.30, 1.65]), # vertical right |
| 168 | + |
| 169 | + # polygon with small distance to horizontal line of letter G |
| 170 | + # starting point: lower right corner of the left vertical line of letter M |
| 171 | + # 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 |
| 190 | + m_y1 = 0.3 |
| 191 | + m_y2 = 1.63 |
| 192 | + m_y = [ |
| 193 | + m_y1, # vertical left upwarts |
| 194 | + m_y1, |
| 195 | + m_y2, |
| 196 | + m_y2, |
| 197 | + m_y2 - m_y2 / 4, # mid pick above |
| 198 | + m_y2, # vertical right downwarts |
| 199 | + m_y2, |
| 200 | + m_y1, |
| 201 | + m_y1, |
| 202 | + m_y2 - m_y2 / 3, # right pick below |
| 203 | + m_y2 - m_y2 / 2 - m_y2 / 18, # mid pick below |
| 204 | + m_y2 - m_y2 / 3, # left pick below |
173 | 205 | ]
|
174 |
| - for x, y in lines_m: |
175 |
| - fig.plot(x=x, y=y, pen=f"10p,{color_red}", perspective=True) |
176 |
| - # middle corner |
177 |
| - fig.plot(x=0.9, y=0.9, style="d0.3c", fill=color_red, perspective=True) |
| 206 | + fig.plot(x=m_x - 0.06, y=m_y, close=True, fill=color_red) # get ride of the x shift |
178 | 207 |
|
179 | 208 | # .............................................................................
|
180 | 209 | # letter T
|
|
0 commit comments