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

Skip to content

Commit 53d3864

Browse files
authored
Merge pull request #10116 from dstansby/3d-tricontour
TST: Add simple image test for 3D tricontour and tricontourf
2 parents 45ebc85 + bcdde41 commit 53d3864

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

lib/mpl_toolkits/tests/test_mplot3d.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,6 +96,22 @@ def test_contourf3d_fill():
9696
ax.set_zlim(-1, 1)
9797

9898

99+
@image_comparison(baseline_images=['tricontour'], remove_text=True,
100+
style='mpl20', extensions=['png'])
101+
def test_tricontour():
102+
fig = plt.figure()
103+
104+
np.random.seed(19680801)
105+
x = np.random.rand(1000) - 0.5
106+
y = np.random.rand(1000) - 0.5
107+
z = -(x**2 + y**2)
108+
109+
ax = fig.add_subplot(1, 2, 1, projection='3d')
110+
ax.tricontour(x, y, z)
111+
ax = fig.add_subplot(1, 2, 2, projection='3d')
112+
ax.tricontourf(x, y, z)
113+
114+
99115
@image_comparison(baseline_images=['lines3d'], remove_text=True)
100116
def test_lines3d():
101117
fig = plt.figure()

0 commit comments

Comments
 (0)