8000 Make streamplot test data rectangular. · QuLogic/matplotlib@c2bf8b4 · GitHub
[go: up one dir, main page]

Skip to content

Commit c2bf8b4

Browse files
committed
Make streamplot test data rectangular.
1 parent e13f0bd commit c2bf8b4

7 files changed

+4
-4
lines changed
Loading
Loading
Loading
Loading
Loading
Loading

lib/matplotlib/tests/test_streamplot.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@
1313

1414

1515
def velocity_field():
16-
Y, X = np.mgrid[-3:3:100j, -3:3:100j]
16+
Y, X = np.mgrid[-3:3:100j, -3:3:200j]
1717
U = -1 - X**2 + Y
1818
V = 1 + X - Y**2
1919
return X, Y, U, V
2020

2121

2222
def swirl_velocity_field():
23-
x = np.linspace(-3., 3., 100)
23+
x = np.linspace(-3., 3., 200)
2424
y = np.linspace(-3., 3., 100)
2525
X, Y = np.meshgrid(x, y)
2626
a = 0.1
@@ -70,8 +70,8 @@ def test_linewidth():
7070
def test_masks_and_nans():
7171
X, Y, U, V = velocity_field()
7272
mask = np.zeros(U.shape, dtype=bool)
73-
mask[40:60, 40:60] = 1
74-
U[:20, :20] = np.nan
73+
mask[40:60, 80:120] = 1
74+
U[:20, :40] = np.nan
7575
U = np.ma.array(U, mask=mask)
7676
# Compatibility for old test image
7777
ax = plt.figure().subplots()

0 commit comments

Comments
 (0)
0