Skip to content

Commit 3eace1e

Browse files
committed
New test for masking when using non-optimal path
1 parent 296a388 commit 3eace1e

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed
Loading

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -433,6 +433,19 @@ def test_surface3d_masked():
433433
ax.set_zlim(-1, 1000)
434434

435435

436+
@mpl3d_image_comparison(['surface3d_masked_strides.png'])
437+
def test_surface3d_masked_strides():
438+
fig = plt.figure()
439+
ax = fig.add_subplot(projection='3d')
440+
X = np.linspace(-1, 1)
441+
Y = np.linspace(-1, 1)
442+
X, Y = np.meshgrid(X, Y)
443+
Z = X**2 + Y**2
444+
Z[30:40, 10:20] = 0.0
445+
Z = np.ma.masked_equal(Z, 0.0)
446+
ax.plot_surface(X, Y, Z, lw=0, antialiased=False, rstride=3, cstride=3)
447+
448+
436449
@mpl3d_image_comparison(['text3d.png'], remove_text=False)
437450
def test_text3d():
438451
fig = plt.figure()

0 commit comments

Comments
 (0)