1+ # import maxplotlib.canvas.canvas as canvas
2+ from maxplotlib .subfigure .tikz_figure import TikzFigure
3+ def tikz_logo ():
4+ tikz = TikzFigure ()
5+
6+ path_actions = ['draw' , 'rounded corners' , 'line width=3' ]
7+
8+ # M
9+ nodes = [[0 ,0 ],[0 ,3 ],[1 ,2 ],[2 ,3 ],[2 ,0 ]]
10+ for i , node_data in enumerate (nodes ):
11+ tikz .add_node (node_data [0 ], node_data [1 ], f"M{ i } " , layer = 0 )
12+ tikz .add_path ([f"M{ i } " for i in range (len (nodes ))], path_actions = path_actions , layer = 1 )
13+
14+ # P
15+ nodes = [[3 ,0 ],[3 ,3 ],[4 ,2.5 ],[4 ,1.5 ],[3 ,1 ]]
16+ for i , node_data in enumerate (nodes ):
17+ tikz .add_node (node_data [0 ], node_data [1 ], f"P{ i } " , layer = 0 )
18+ tikz .add_path ([f"P{ i } " for i in range (len (nodes ))], path_actions = path_actions , layer = 1 )
19+
20+ # L
21+ nodes = [[5 ,3 ],[5 ,0 ],[7 ,0 ]]
22+ for i , node_data in enumerate (nodes ):
23+ tikz .add_node (node_data [0 ], node_data [1 ], f"L{ i } " , layer = 0 )
24+ tikz .add_path ([f"L{ i } " for i in range (len (nodes ))], path_actions = path_actions , layer = 1 )
25+
26+ return tikz
0 commit comments