1010ax = fig .add_subplot (111 )
1111
1212pathdata = [
13- (Path .MOVETO , (0 , 0 )),
14- (Path .CURVE4 , (- 1 , 0 .1 )),
15- (Path .CURVE4 , (- 1 , 0.9 )),
16- (Path .CURVE4 , (0 , 1 )),
17- (Path .LINETO , (2 , 1 )),
18- (Path .CURVE4 , (3 , 0.9 )),
19- (Path .CURVE4 , (3 , 0.1 )),
20- (Path .CURVE4 , (2 , 0 )),
21- (Path .CLOSEPOLY , (0 , 0 )),
13+ (Path .MOVETO , (1.58 , - 2.57 )),
14+ (Path .CURVE4 , (0.35 , - 1 .1 )),
15+ (Path .CURVE4 , (- 1.75 , 2.0 )),
16+ (Path .CURVE4 , (0.375 , 2.0 )),
17+ (Path .LINETO , (0.85 , 1.15 )),
18+ (Path .CURVE4 , (2.2 , 3.2 )),
19+ (Path .CURVE4 , (3 , 0.05 )),
20+ (Path .CURVE4 , (2.0 , - 0.5 )),
21+ (Path .CLOSEPOLY , (1.58 , - 2.57 )),
2222 ]
2323
2424codes , verts = zip (* pathdata )
@@ -123,9 +123,8 @@ def motion_notify_callback(self, event):
123123 if event .button != 1 : return
124124 x ,y = event .xdata , event .ydata
125125
126- # todo: expose me
127126 vertices = self .pathpatch .get_path ().vertices
128-
127+
129128 vertices [self ._ind ] = x ,y
130129 self .line .set_data (zip (* vertices ))
131130
@@ -137,8 +136,8 @@ def motion_notify_callback(self, event):
137136
138137interactor = PathInteractor (patch )
139138ax .set_title ('drag vertices to update path' )
140- ax .set_xlim (- 5 , 5 )
141- ax .set_ylim (- 5 , 5 )
139+ ax .set_xlim (- 3 , 4 )
140+ ax .set_ylim (- 3 , 4 )
142141
143142plt .show ()
144143
0 commit comments