()
| 807 | |
| 808 | @mpl3d_image_comparison(['trisurf3d.png'], tol=0.061, style='mpl20') |
| 809 | def 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') |
nothing calls this directly
no test coverage detected
searching dependent graphs…