()
| 643 | |
| 644 | @mpl3d_image_comparison(['surface3d.png'], style='mpl20') |
| 645 | def test_surface3d(): |
| 646 | # Remove this line when this test image is regenerated. |
| 647 | plt.rcParams['pcolormesh.snap'] = False |
| 648 | |
| 649 | fig = plt.figure() |
| 650 | ax = fig.add_subplot(projection='3d') |
| 651 | X = np.arange(-5, 5, 0.25) |
| 652 | Y = np.arange(-5, 5, 0.25) |
| 653 | X, Y = np.meshgrid(X, Y) |
| 654 | R = np.hypot(X, Y) |
| 655 | Z = np.sin(R) |
| 656 | surf = ax.plot_surface(X, Y, Z, rcount=40, ccount=40, cmap="coolwarm", |
| 657 | lw=0, antialiased=False) |
| 658 | plt.rcParams['axes3d.automargin'] = True # Remove when image is regenerated |
| 659 | ax.set_zlim(-1.01, 1.01) |
| 660 | fig.colorbar(surf, shrink=0.5, aspect=5) |
| 661 | |
| 662 | |
| 663 | @image_comparison(['surface3d_label_offset_tick_position.png'], style='mpl20') |
nothing calls this directly
no test coverage detected
searching dependent graphs…