8000 Update test · matplotlib/matplotlib@d6a445e · GitHub
[go: up one dir, main page]

Skip to content

Commit d6a445e

Browse files
committed
Update test
1 parent d307114 commit d6a445e

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

lib/matplotlib/tests/test_contour.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -217,14 +217,12 @@ def test_log_locator_levels():
217217

218218
@pytest.mark.parametrize("n_levels", [2, 3, 4, 5, 6])
219219
def test_lognorm_levels(n_levels):
220-
x = np.arange(100) + 1
221-
y = np.arange(100) + 1
222-
x, y = np.meshgrid(x, y)
223-
data = x**2 + y**2
220+
x, y = np.mgrid[1:10:0.1, 1:10:0.1]
221+
data = np.abs(np.sin(x)*np.exp(y))
224222

225223
fig, ax = plt.subplots()
226224
im = ax.contour(x, y, data, norm=LogNorm(), levels=n_levels)
227-
cbar = fig.colorbar(im, ax=ax)
225+
fig.colorbar(im, ax=ax)
228226

229227
levels = im.levels
230228
visible_levels = levels[(levels <= data.max()) & (levels >= data.min())]

0 commit comments

Comments
 (0)
0