Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 7f00354

Browse filesBrowse files
committed
fix a condition test and remove some useless assignment
1 parent 02477de commit 7f00354
Copy full SHA for 7f00354

File tree

Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+3
-6
lines changed

‎examples/pylab_examples/arrow_demo.py

Copy file name to clipboardExpand all lines: examples/pylab_examples/arrow_demo.py
+3-5Lines 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

Copy file name to clipboardExpand all lines: lib/matplotlib/mlab.py
-1Lines 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)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.