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

Skip to content

Commit 65390b5

Browse files
committed
Fixed failing test on travis.
1 parent 88b722f commit 65390b5

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

lib/matplotlib/tests/test_collections.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -416,6 +416,13 @@ def test_add_collection():
416416

417417
@cleanup
418418
def test_quiver_limits():
419+
ax = plt.axes()
420+
x, y = np.arange(8), np.arange(10)
421+
data = u = v = np.linspace(0, 10, 80).reshape(10, 8)
422+
q = plt.quiver(x, y, u, v)
423+
assert_equal(q.get_datalim(ax.transData).bounds, (0., 0., 7., 9.))
424+
425+
plt.figure()
419426
ax = plt.axes()
420427
x = np.linspace(-5, 10, 20)
421428
y = np.linspace(-2, 4, 10)

lib/matplotlib/tests/test_pickle.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,9 @@ def test_complete():
158158
plt.subplot(3, 3, 6)
159159
plt.streamplot(x, y, u, v)
160160

161-
plt.subplot(3, 3, 7)
161+
ax = plt.subplot(3, 3, 7)
162+
ax.set_xlim(0, 7)
163+
ax.set_ylim(0, 9)
162164
plt.quiver(x, y, u, v)
163165

164166
plt.subplot(3, 3, 8)

0 commit comments

Comments
 (0)