Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fb51972

Browse files
committed
pep8 spacing and imports
1 parent ea6cb68 commit fb51972

1 file changed

Lines changed: 10 additions & 7 deletions

File tree

lib/mpl_toolkits/mplot3d/axes3d.py

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
"""
1212
from __future__ import (absolute_import, division, print_function,
1313
unicode_literals)
14+
import math
1415

1516
import six
1617
from six.moves import map, xrange, zip
@@ -33,6 +34,8 @@
3334
from . import art3d
3435
from . import proj3d
3536
from . import axis3d
37+
from mpl_toolkits.mplot3d.art3d import Line3DCollection
38+
3639

3740
def unit_bbox():
3841
box = Bbox(np.array([[0, 0], [1, 1]]))
@@ -2509,7 +2512,7 @@ def calc_arrow(u, v, w, angle=15):
25092512

25102513
# for each arrow
25112514
for i in xrange(xs.shape[0]):
2512-
# calulate body
2515+
# calculate body
25132516
x = xs[i]
25142517
y = ys[i]
25152518
z = zs[i]
@@ -2521,8 +2524,8 @@ def calc_arrow(u, v, w, angle=15):
25212524

25222525
# normalize
25232526
norm = math.sqrt(u ** 2 + v ** 2 + w ** 2)
2524-
if norm==0:
2525-
norm=1
2527+
if norm == 0:
2528+
norm = 1
25262529
u /= norm
25272530
v /= norm
25282531
w /= norm
@@ -2541,16 +2544,16 @@ def calc_arrow(u, v, w, angle=15):
25412544

25422545
# normalize arrowhead 1
25432546
norm = math.sqrt(ua1 ** 2 + va1 ** 2 + wa1 ** 2)
2544-
if norm==0:
2545-
norm=1
2547+
if norm == 0:
2548+
norm = 1
25462549
ua1_ = ua1/norm
25472550
va1_ = va1/norm
25482551
wa1_ = wa1/norm
25492552

25502553
# normalize arrowhead 2
25512554
norm = math.sqrt(ua1 ** 2 + va1 ** 2 + wa2 ** 2)
2552-
if norm==0:
2553-
norm=1
2555+
if norm == 0:
2556+
norm = 1
25542557
ua2_ = ua1/norm
25552558
va2_ = va1/norm
25562559
wa2_ = wa2/norm

0 commit comments

Comments
 (0)