@@ -606,12 +606,13 @@ def _angles_lengths(self, U, V, eps=1):
606
606
607
607
def _make_verts (self , U , V ):
608
608
uv = (U + V * 1j )
609
- if self .angles == 'xy' and self .scale_units == 'xy' :
609
+ str_angles = isinstance (self .angles , six .string_types )
610
+ if str_angles and (self .angles == 'xy' and self .scale_units == 'xy' ):
610
611
# Here eps is 1 so that if we get U, V by diffing
611
612
# the X, Y arrays, the vectors will connect the
612
613
# points, regardless of the axis scaling (including log).
613
614
angles , lengths = self ._angles_lengths (U , V , eps = 1 )
614
- elif self .angles == 'xy' or self .scale_units == 'xy' :
615
+ elif str_angles and ( self .angles == 'xy' or self .scale_units == 'xy' ) :
615
616
# Calculate eps based on the extents of the plot
616
617
# so that we don't end up with roundoff error from
617
618
# adding a small number to a large.
@@ -644,9 +645,9 @@ def _make_verts(self, U, V):
644
645
self .scale = scale * widthu_per_lenu
645
646
length = a * (widthu_per_lenu / (self .scale * self .width ))
646
647
X , Y = self ._h_arrows (length )
647
- if self .angles == 'xy' :
648
+ if str_angles and ( self .angles == 'xy' ) :
648
649
theta = angles
649
- elif self .angles == 'uv' :
650
+ elif str_angles and ( self .angles == 'uv' ) :
650
651
theta = np .angle (uv )
651
652
else :
652
653
# Make a copy to avoid changing the input array.
0 commit comments