Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Add test for surface plot with inf values
  • Loading branch information
LemonBoy committed Jul 31, 2023
commit 7e820b7bbfcaac83a974ae72bc04fa193885eddf
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions lib/mpl_toolkits/mplot3d/tests/test_axes3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -2232,3 +2232,16 @@ def test_scatter_masked_color():
# Assert sizes' equality
assert len(path3d.get_offsets()) ==\
len(super(type(path3d), path3d).get_facecolors())


@mpl3d_image_comparison(['surface3d_zsort_inf.png'], style='mpl20')
def test_surface3d_zsort_inf():
fig = plt.figure()
ax = fig.add_subplot(projection='3d')

x, y = np.mgrid[-2:2:0.1,-2:2:0.1]
z = np.sin(x)**2 + np.cos(y)**2
z[x.shape[0] // 2:, x.shape[1] // 2:] = np.inf

ax.plot_surface(x, y, z, cmap='jet')
ax.view_init(elev=45, azim=145)