Skip to content

Commit 27d74b2

Browse files
committed
Add masked surface with strides test
1 parent 1d7c9bd commit 27d74b2

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
61 KB
Loading

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -446,6 +446,17 @@ def test_surface3d_masked():
446446
ax.plot_surface(x, y, z, facecolors=colors)
447447
ax.view_init(30, -80)
448448

449+
@mpl3d_image_comparison(['surface3d_masked_strides.png'])
450+
def test_surface3d_masked_strides():
451+
fig = plt.figure()
452+
ax = fig.add_subplot(projection='3d')
453+
454+
x, y = np.mgrid[-6:6.1:1, -6:6.1:1]
455+
z = np.ma.masked_less(x * y, 2)
456+
457+
ax.plot_surface(x, y, z, rstride=4, cstride=4)
458+
ax.view_init(60, -45)
459+
449460

450461
@mpl3d_image_comparison(['text3d.png'], remove_text=False)
451462
def test_text3d():

0 commit comments

Comments
 (0)