MCPcopy
hub / github.com/matplotlib/matplotlib / test_contourf3d_fill

Function test_contourf3d_fill

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

Source from the content-addressed store, hash-verified

264
265@mpl3d_image_comparison(['contourf3d_fill.png'], style='mpl20')
266def test_contourf3d_fill():
267 plt.rcParams['axes3d.automargin'] = True # Remove when image is regenerated
268 fig = plt.figure()
269 ax = fig.add_subplot(projection='3d')
270 X, Y = np.meshgrid(np.arange(-2, 2, 0.25), np.arange(-2, 2, 0.25))
271 Z = X.clip(0, 0)
272 # This produces holes in the z=0 surface that causes rendering errors if
273 # the Poly3DCollection is not aware of path code information (issue #4784)
274 Z[::5, ::5] = 0.1
275 ax.contourf(X, Y, Z, offset=0, levels=[-0.1, 0], cmap="coolwarm")
276 ax.set_xlim(-2, 2)
277 ax.set_ylim(-2, 2)
278 ax.set_zlim(-1, 1)
279
280
281@pytest.mark.parametrize('extend, levels', [['both', [2, 4, 6]],

Callers

nothing calls this directly

Calls 7

figureMethod · 0.80
add_subplotMethod · 0.80
set_zlimMethod · 0.80
clipMethod · 0.45
contourfMethod · 0.45
set_xlimMethod · 0.45
set_ylimMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…