MCPcopy
hub / github.com/matplotlib/matplotlib / contourf

Method contourf

lib/mpl_toolkits/mplot3d/axes3d.py:2982–3016  ·  view source on GitHub ↗

Create a 3D filled contour plot. Parameters ---------- X, Y, Z : array-like Input data. See `.Axes.contourf` for supported data shapes. zdir : {'x', 'y', 'z'}, default: 'z' The direction to use. offset : float, optional

(self, X, Y, Z, *args,
                 zdir='z', offset=None, axlim_clip=False, **kwargs)

Source from the content-addressed store, hash-verified

2980
2981 @_preprocess_data()
2982 def contourf(self, X, Y, Z, *args,
2983 zdir='z', offset=None, axlim_clip=False, **kwargs):
2984 """
2985 Create a 3D filled contour plot.
2986
2987 Parameters
2988 ----------
2989 X, Y, Z : array-like
2990 Input data. See `.Axes.contourf` for supported data shapes.
2991 zdir : {'x', 'y', 'z'}, default: 'z'
2992 The direction to use.
2993 offset : float, optional
2994 If specified, plot a projection of the contour lines at this
2995 position in a plane normal to *zdir*.
2996 axlim_clip : bool, default: False
2997 Whether to hide lines with a vertex outside the axes view limits.
2998
2999 .. versionadded:: 3.10
3000 data : indexable object, optional
3001 DATA_PARAMETER_PLACEHOLDER
3002 *args, **kwargs
3003 Other arguments are forwarded to `matplotlib.axes.Axes.contourf`.
3004
3005 Returns
3006 -------
3007 matplotlib.contour.QuadContourSet
3008 """
3009 had_data = self.has_data()
3010
3011 jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
3012 cset = super().contourf(jX, jY, jZ, *args, **kwargs)
3013 levels = self._add_contourf_set(cset, zdir, offset, axlim_clip)
3014
3015 self._auto_scale_contourf(X, Y, Z, zdir, levels, had_data)
3016 return cset
3017
3018 contourf3D = contourf
3019

Callers 5

test_contourf3dFunction · 0.45
test_contourf3d_fillFunction · 0.45
test_contourf3d_extendFunction · 0.45
test_scale3d_artists_logFunction · 0.45

Calls 3

_add_contourf_setMethod · 0.95
_auto_scale_contourfMethod · 0.95
has_dataMethod · 0.80

Tested by 5

test_contourf3dFunction · 0.36
test_contourf3d_fillFunction · 0.36
test_contourf3d_extendFunction · 0.36
test_scale3d_artists_logFunction · 0.36