@@ -790,7 +790,7 @@ def set_closed(self, closed):
790
790
def get_xy (self ):
791
791
return self ._path .vertices
792
792
def set_xy (self , vertices ):
793
- self ._path = Path (vertices )
793
+ self ._path = Path (vertices , closed = self . _closed )
794
794
_get_xy = get_xy
795
795
_set_xy = set_xy
796
796
xy = property (
@@ -871,7 +871,8 @@ def __str__(self):
871
871
[ 0.0 , 0.1 ], [ 0.0 , - 0.1 ],
872
872
[ 0.8 , - 0.1 ], [ 0.8 , - 0.3 ],
873
873
[ 1.0 , 0.0 ], [ 0.8 , 0.3 ],
874
- [ 0.8 , 0.1 ], [ 0.0 , 0.1 ] ] )
874
+ [ 0.8 , 0.1 ], [ 0.0 , 0.1 ] ],
875
+ closed = True )
875
876
876
877
@docstring .dedent_interpd
877
878
def __init__ ( self , x , y , dx , dy , width = 1.0 , ** kwargs ):
@@ -979,7 +980,7 @@ def __init__(self, x, y, dx, dy, width=0.001, length_includes_head=False, \
979
980
M = np .array ([[cx , sx ],[- sx ,cx ]])
980
981
verts = np .dot (coords , M ) + (x + dx , y + dy )
981
982
982
- Polygon .__init__ (self , map (tuple , verts ), ** kwargs )
983
+ Polygon .__init__ (self , map (tuple , verts ), closed = True , ** kwargs )
983
984
984
985
docstring .interpd .update ({"FancyArrow" :FancyArrow .__init__ .__doc__ })
985
986
@@ -1051,7 +1052,7 @@ def get_path(self):
1051
1052
xs = self .convert_xunits ([xb1 , xb2 , xc2 , xd2 , x1 , xd1 , xc1 , xb1 ])
1052
1053
ys = self .convert_yunits ([yb1 , yb2 , yc2 , yd2 , y1 , yd1 , yc1 , yb1 ])
1053
1054
1054
- return Path (zip (xs , ys ))
1055
+ return Path (zip (xs , ys ), closed = True )
1055
1056
1056
1057
def get_patch_transform (self ):
1057
1058
return transforms .IdentityTransform ()
@@ -3696,18 +3697,18 @@ def set_dpi_cor(self, dpi_cor):
3696
3697
dpi_cor is currently used for linewidth-related things and
3697
3698
shink factor. Mutation scale is not affected by this.
3698
3699
"""
3699
-
3700
+
3700
3701
self ._dpi_cor = dpi_cor
3701
3702
3702
3703
def get_dpi_cor (self ):
3703
3704
"""
3704
3705
dpi_cor is currently used for linewidth-related things and
3705
3706
shink factor. Mutation scale is not affected by this.
3706
3707
"""
3707
-
3708
+
3708
3709
return self ._dpi_cor
3709
3710
3710
-
3711
+
3711
3712
def set_positions (self , posA , posB ):
3712
3713
""" set the begin end end positions of the connecting
3713
3714
path. Use current vlaue if None.
@@ -3905,7 +3906,7 @@ def draw(self, renderer):
3905
3906
3906
3907
# FIXME : dpi_cor is for the dpi-dependecy of the
3907
3908
# linewidth. There could be room for improvement.
3908
- #
3909
+ #
3909
3910
#dpi_cor = renderer.points_to_pixels(1.)
3910
3911
self .set_dpi_cor (renderer .points_to_pixels (1. ))
3911
3912
path , fillable = self .get_path_in_displaycoord ()
@@ -4167,7 +4168,7 @@ def get_path_in_displaycoord(self):
4167
4168
"""
4168
4169
4169
4170
dpi_cor = self .get_dpi_cor ()
4170
-
4171
+
4171
4172
x , y = self .xy1
4172
4173
posA = self ._get_xy (x , y , self .coords1 , self .axesA )
4173
4174
0 commit comments