@@ -32,8 +32,13 @@ def _create_logo( # noqa: PLR0915
3232
3333 # Helpful definitions
3434 size = 4
35- region = [- size , size ] * 2
3635 proj = "x1c"
36+ region = {
37+ "horizontal" : [- size , size * 8.0 , - size , size ],
38+ "vertical" : [- size , size , - size * 1.75 , size ],
39+ "none" : [- size , size , - size , size ],
40+ }[wordmark ]
41+
3742 # Rotation around z-axis by 30 degrees counter-clockwise placed in the center.
3843 perspective = "30+w0/0"
3944
@@ -77,7 +82,7 @@ def _create_logo( # noqa: PLR0915
7782 font = "AvantGarde-Book"
7883 match wordmark :
7984 case "vertical" :
80- args_text_wm = {"x" : 0 , "y" : - 4.5 , "justify" : "CT" , "font" : f"2.5c ,{ font } " }
85+ args_text_wm = {"x" : 0 , "y" : - 4.5 , "justify" : "CT" , "font" : f"2.4c ,{ font } " }
8186 case "horizontal" :
8287 args_text_wm = {"x" : 4.5 , "y" : 0.8 , "justify" : "LM" , "font" : f"8c,{ font } " }
8388
@@ -224,8 +229,7 @@ def _compass_lines():
224229
225230 # Add wordmark "PyGMT"
226231 if wordmark != "none" :
227- text_wm = f"@;{ color_py } ;Py@;;@;{ color_gmt } ;GMT@;;"
228- fig .text (text = text_wm , no_clip = True , ** args_text_wm )
232+ fig .text (text = f"@;{ color_py } ;Py@;;@;{ color_gmt } ;GMT@;;" , ** args_text_wm )
229233
230234 # Helpful for implementing the logo; not included in the logo
231235 if debug :
@@ -240,8 +244,10 @@ def _compass_lines():
240244 pen = "0.3p,gray30,2_2"
241245 fig .plot (x = 0 , y = 0 , style = f"c{ 2 * (r2 + (r3 - r4 ))} c" , pen = pen )
242246 # Lines for letter M
243- fig .hlines (y = [r4 , r5 ], xmin = - 3 , pen = pen , perspective = True )
244- fig .vlines (x = [r4 , (thick_gap + r4 ) / 2 ], ymax = 3 , pen = pen , perspective = True )
247+ size_s = 0.9 * size
248+ fig .hlines (y = [r4 , r5 ], xmin = - size_s , xmax = size_s , pen = pen , perspective = True )
249+ m_mid = (thick_gap + r4 ) / 2
250+ fig .vlines (x = [r4 , m_mid ], ymin = - size_s , ymax = size_s , pen = pen , perspective = True )
245251
246252 if figname :
247253 fig .savefig (fname = figname )
0 commit comments