Skip to content

Commit e1e1a32

Browse files
fix quiver3d incorrect arrow colors
1 parent c2aa4ee commit e1e1a32

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,14 +2986,6 @@ def calc_arrows(UVW):
29862986
# Normalize rows of UVW
29872987
norm = np.linalg.norm(UVW, axis=1)
29882988

2989-
# If any row of UVW is all zeros, don't make a quiver for it
2990-
mask = norm > 0
2991-
XYZ = XYZ[mask]
2992-
if normalize:
2993-
UVW = UVW[mask] / norm[mask].reshape((-1, 1))
2994-
else:
2995-
UVW = UVW[mask]
2996-
29972989
if len(XYZ) > 0:
29982990
# compute the shaft lines all at once with an outer product
29992991
shafts = (XYZ - np.multiply.outer(shaft_dt, UVW)).swapaxes(0, 1)
@@ -3006,7 +2998,7 @@ def calc_arrows(UVW):
30062998
# transpose to get a list of lines
30072999
heads = heads.swapaxes(0, 1)
30083000

3009-
lines = [*shafts, *heads]
3001+
lines = [*shafts, *heads[::2], *heads[1::2]]
30103002
else:
30113003
lines = []
30123004

0 commit comments

Comments
 (0)