8000 fix a condition test and remove some useless assignment · matplotlib/matplotlib@7f00354 · GitHub
[go: up one dir, main page]

Skip to content

Commit 7f00354

Browse files
committed
fix a condition test and remove some useless assignment
1 parent 02477de commit 7f00354

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

examples/pylab_examples/arrow_demo.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ def do_fontsize(k):
119119

120120
arrow_h_offset = 0.25 # data coordinates, empirically determined
121121
max_arrow_length = 1 - 2*arrow_h_offset
122-
123-
max_arrow_width = max_arrow_width
124122
max_head_width = 2.5*max_arrow_width
125123
max_head_length = 2*max_arrow_width
126124
arrow_params = {'length_includes_head': True, 'shape': shape,
@@ -164,11 +162,11 @@ def draw_arrow(pair, alpha=alpha, ec=ec, labelcolor=labelcolor):
164162
max_head_length)
165163
else:
166164
length = max_arrow_length
165+
167166
# set the transparency of the arrow
168-
if display == 'alph':
167+
if display == 'alpha':
169168
alpha = min(data[pair]/sf, alpha)
170-
else:
171-
alpha = alpha
169+
172170
# set the width of the arrow
173171
if display == 'width':
174172
scale = data[pair]/sf

lib/matplotlib/mlab.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3881,7 +3881,6 @@ def cross_from_below(x, threshold):
38813881
38823882
"""
38833883
x = np.asarray(x)
3884-
threshold = threshold
38853884
ind = np.nonzero((x[:-1] < threshold) & (x[1:] >= threshold))[0]
38863885
if len(ind):
38873886
return ind+1

0 commit comments

Comments
 (0)
0