MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / test_trisurf3d

Function test_trisurf3d

lib/mpl_toolkits/mplot3d/tests/test_axes3d.py:809–823  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

807
808@mpl3d_image_comparison(['trisurf3d.png'], tol=0.061, style='mpl20')
809def test_trisurf3d():
810 n_angles = 36
811 n_radii = 8
812 radii = np.linspace(0.125, 1.0, n_radii)
813 angles = np.linspace(0, 2*np.pi, n_angles, endpoint=False)
814 angles = np.repeat(angles[..., np.newaxis], n_radii, axis=1)
815 angles[:, 1::2] += np.pi/n_angles
816
817 x = np.append(0, (radii*np.cos(angles)).flatten())
818 y = np.append(0, (radii*np.sin(angles)).flatten())
819 z = np.sin(-x*y)
820
821 fig = plt.figure()
822 ax = fig.add_subplot(projection='3d')
823 ax.plot_trisurf(x, y, z, cmap="jet", linewidth=0.2)
824
825
826@mpl3d_image_comparison(['trisurf3d_shaded.png'], tol=0.03, style='mpl20')

Callers

nothing calls this directly

Calls 3

figureMethod · 0.80
add_subplotMethod · 0.80
plot_trisurfMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…