8000 Removed normalization of arrows in 3D quiver by DanHickstein · Pull Request #5458 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
Prev Previous commit
Next Next commit
Simplified to "if normalize" and fixed typo
also added a space before division. Also
  • Loading branch information
DanHickstein committed Nov 10, 2015
commit 0f75d916c1c583e111ea7cc3fa3d9bdfeb60dfe0
6 changes: 3 additions & 3 deletions lib/mpl_toolkits/mplot3d/axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2544,7 +2544,7 @@ def calc_arrow(uvw, angle=15):
# pivot point
pivot = kwargs.pop('pivot', 'tail')
# normalize
pivot = kwargs.pop('normalize', False)
normalize = kwargs.pop('normalize', False)

# handle args
argi = 6
Expand Down Expand Up @@ -2605,8 +2605,8 @@ def calc_arrow(uvw, angle=15):
# If any row of UVW is all zeros, don't make a quiver for it
mask = norm > 1e-10
XYZ = XYZ[mask]
if normalize == True:
UVW = UVW[mask]/ norm[mask].reshape((-1, 1))
if normalize:
UVW = UVW[mask] / norm[mask].reshape((-1, 1))
else:
UVW = UVW[mask]

Expand Down
0