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

Skip to content

Commit 2ab4085

Browse files
author
simonpf
committed
Adapted tests of pcolormesh.
1 parent 923e880 commit 2ab4085

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/matplotlib/tests/test_axes.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,12 +1180,22 @@ def test_pcolorargs():
11801180
y = np.linspace(-1.5, 1.5, n*2)
11811181
X, Y = np.meshgrid(x, y)
11821182
Z = np.sqrt(X**2 + Y**2)/5
1183+
Z_1 = Z[:-1, :-1]
11831184

11841185
_, ax = plt.subplots()
11851186
with pytest.raises(TypeError):
11861187
ax.pcolormesh(y, x, Z)
11871188
with pytest.raises(TypeError):
11881189
ax.pcolormesh(X, Y, Z.T)
1190+
with pytest.raises(TypeError):
1191+
ax.pcolormesh(y, x, Z, shading="gouraud")
1192+
with pytest.raises(TypeError):
1193+
ax.pcolormesh(X, Y, Z.T, shading="gouraud")
1194+
with pytest.raises(TypeError):
1195+
ax.pcolormesh(X, Y, Z_1, shading="gouraud")
1196+
1197+
ax.pcolormesh(X, Y, Z_1)
1198+
ax.pcolormesh(x, y, Z_1, shading="gouraud", interpolate_grids=True)
11891199

11901200

11911201
@image_comparison(baseline_images=['canonical'])

0 commit comments

Comments
 (0)