diff options
author | robot-piglet <[email protected]> | 2025-08-01 21:30:33 +0300 |
---|---|---|
committer | robot-piglet <[email protected]> | 2025-08-01 21:44:33 +0300 |
commit | 5e971f676b02569e1f054c14ab46fc88d64646ca (patch) | |
tree | e91e46b98393b6ff7e7c581cc7f3b728fc67783c /contrib/python/matplotlib/py3/mpl_toolkits | |
parent | d26972227453799b411b840c959784b73d6d99db (diff) |
Intermediate changes
commit_hash:2593e29b01982d14fc576c3f4c4ddf2e4febb604
Diffstat (limited to 'contrib/python/matplotlib/py3/mpl_toolkits')
-rw-r--r-- | contrib/python/matplotlib/py3/mpl_toolkits/mplot3d/axes3d.py | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/contrib/python/matplotlib/py3/mpl_toolkits/mplot3d/axes3d.py b/contrib/python/matplotlib/py3/mpl_toolkits/mplot3d/axes3d.py index a74c11f54e6..6bcd7a6b65a 100644 --- a/contrib/python/matplotlib/py3/mpl_toolkits/mplot3d/axes3d.py +++ b/contrib/python/matplotlib/py3/mpl_toolkits/mplot3d/axes3d.py @@ -2727,15 +2727,10 @@ class Axes3D(Axes): UVW = np.column_stack(input_args[3:]).astype(float) # Normalize rows of UVW - norm = np.linalg.norm(UVW, axis=1) - - # If any row of UVW is all zeros, don't make a quiver for it - mask = norm > 0 - XYZ = XYZ[mask] if normalize: - UVW = UVW[mask] / norm[mask].reshape((-1, 1)) - else: - UVW = UVW[mask] + norm = np.linalg.norm(UVW, axis=1) + norm[norm == 0] = 1 + UVW = UVW / norm.reshape((-1, 1)) if len(XYZ) > 0: # compute the shaft lines all at once with an outer product @@ -2749,7 +2744,7 @@ class Axes3D(Axes): # transpose to get a list of lines heads = heads.swapaxes(0, 1) - lines = [*shafts, *heads] + lines = [*shafts, *heads[::2], *heads[1::2]] else: lines = [] |