Skip to content

Commit 4b41c24

Browse files
committed
Add test
1 parent 432fb08 commit 4b41c24

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,17 @@ def test_tricontour():
198198
ax.tricontourf(x, y, z)
199199

200200

201+
def test_contour3d_1d_input():
202+
# Check that 1D sequences of different length for {x, y} doesn't error
203+
fig = plt.figure()
204+
ax = fig.add_subplot(projection='3d')
205+
nx, ny = 30, 20
206+
x = np.linspace(-10, 10, nx)
207+
y = np.linspace(-10, 10, ny)
208+
z = np.random.randint(0, 2, [ny, nx])
209+
ax.contour(x, y, z, [0.5])
210+
211+
201212
@mpl3d_image_comparison(['lines3d.png'])
202213
def test_lines3d():
203214
fig = plt.figure()

0 commit comments

Comments
 (0)