@@ -58,7 +58,8 @@ def label(xy, text):
5858label (grid [4 ], "Ellipse" )
5959
6060# add an arrow
61- arrow = mpatches .Arrow (grid [5 , 0 ] - 0.05 , grid [5 , 1 ] - 0.05 , 0.1 , 0.1 , width = 0.1 )
61+ arrow = mpatches .Arrow (grid [5 , 0 ] - 0.05 , grid [5 , 1 ] - 0.05 , 0.1 , 0.1 ,
62+ width = 0.1 )
6263patches .append (arrow )
6364label (grid [5 ], "Arrow" )
6465
@@ -67,14 +68,13 @@ def label(xy, text):
6768path_data = [
6869 (Path .MOVETO , [0.018 , - 0.11 ]),
6970 (Path .CURVE4 , [- 0.031 , - 0.051 ]),
70- (Path .CURVE4 , [- 0.115 , 0.073 ]),
71- (Path .CURVE4 , [- 0.03 , 0.073 ]),
72- (Path .LINETO , [- 0.011 , 0.039 ]),
73- (Path .CURVE4 , [0.043 , 0.121 ]),
71+ (Path .CURVE4 , [- 0.115 , 0.073 ]),
72+ (Path .CURVE4 , [- 0.03 , 0.073 ]),
73+ (Path .LINETO , [- 0.011 , 0.039 ]),
74+ (Path .CURVE4 , [0.043 , 0.121 ]),
7475 (Path .CURVE4 , [0.075 , - 0.005 ]),
7576 (Path .CURVE4 , [0.035 , - 0.027 ]),
76- (Path .CLOSEPOLY , [0.018 , - 0.11 ])
77- ]
77+ (Path .CLOSEPOLY , [0.018 , - 0.11 ])]
7878codes , verts = zip (* path_data )
7979path = mpath .Path (verts + grid [6 ], codes )
8080patch = mpatches .PathPatch (path )
@@ -99,8 +99,8 @@ def label(xy, text):
9999ax .add_collection (collection )
100100ax .add_line (line )
101101
102- plt .subplots_adjust (left = 0 , right = 1 , bottom = 0 , top = 1 )
103102plt .axis ('equal' )
104103plt .axis ('off' )
104+ plt .tight_layout ()
105105
106106plt .show ()
0 commit comments