Skip to content

Commit c3d60d3

Browse files
revert quiver3d normalization
1 parent e1e1a32 commit c3d60d3

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2986,6 +2986,10 @@ 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+
if normalize:
2991+
UVW = UVW / norm.reshape((-1, 1))
2992+
29892993
if len(XYZ) > 0:
29902994
# compute the shaft lines all at once with an outer product
29912995
shafts = (XYZ - np.multiply.outer(shaft_dt, UVW)).swapaxes(0, 1)

0 commit comments

Comments
 (0)