MCPcopy Index your code
hub / github.com/matplotlib/matplotlib / tricontourf

Method tricontourf

lib/mpl_toolkits/mplot3d/axes3d.py:3021–3071  ·  view source on GitHub ↗

Create a 3D filled contour plot. .. note:: This method currently produces incorrect output due to a longstanding bug in 3D PolyCollection rendering. Parameters ---------- X, Y, Z : array-like Input data. See `.Axes.tricon

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

Source from the content-addressed store, hash-verified

3019
3020 @_preprocess_data()
3021 def tricontourf(self, *args, zdir='z', offset=None, axlim_clip=False, **kwargs):
3022 """
3023 Create a 3D filled contour plot.
3024
3025 .. note::
3026 This method currently produces incorrect output due to a
3027 longstanding bug in 3D PolyCollection rendering.
3028
3029 Parameters
3030 ----------
3031 X, Y, Z : array-like
3032 Input data. See `.Axes.tricontourf` for supported data shapes.
3033 zdir : {'x', 'y', 'z'}, default: 'z'
3034 The direction to use.
3035 offset : float, optional
3036 If specified, plot a projection of the contour lines at this
3037 position in a plane normal to zdir.
3038 axlim_clip : bool, default: False
3039 Whether to hide lines with a vertex outside the axes view limits.
3040
3041 .. versionadded:: 3.10
3042 data : indexable object, optional
3043 DATA_PARAMETER_PLACEHOLDER
3044 *args, **kwargs
3045 Other arguments are forwarded to
3046 `matplotlib.axes.Axes.tricontourf`.
3047
3048 Returns
3049 -------
3050 matplotlib.tri._tricontour.TriContourSet
3051 """
3052 had_data = self.has_data()
3053
3054 tri, args, kwargs = Triangulation.get_from_args_and_kwargs(
3055 *args, **kwargs)
3056 X = tri.x
3057 Y = tri.y
3058 if 'Z' in kwargs:
3059 Z = kwargs.pop('Z')
3060 else:
3061 # We do this so Z doesn't get passed as an arg to Axes.tricontourf
3062 Z, *args = args
3063
3064 jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
3065 tri = Triangulation(jX, jY, tri.triangles, tri.mask)
3066
3067 cset = super().tricontourf(tri, jZ, *args, **kwargs)
3068 levels = self._add_contourf_set(cset, zdir, offset, axlim_clip)
3069
3070 self._auto_scale_contourf(X, Y, Z, zdir, levels, had_data)
3071 return cset
3072
3073 def add_collection3d(self, col, zs=0, zdir='z', autolim=True, *,
3074 axlim_clip=False):

Callers 15

test_tricontourFunction · 0.80
tricontourfFunction · 0.80
test_tricontourfMethod · 0.80
test_wrong_use_colorizerFunction · 0.80
test_tricontourset_reuseFunction · 0.80
test_tricontourf_pathFunction · 0.80
test_bool_autolevelFunction · 0.80
tricontourf.pyFile · 0.80

Calls 6

_add_contourf_setMethod · 0.95
_auto_scale_contourfMethod · 0.95
TriangulationClass · 0.90
has_dataMethod · 0.80
popMethod · 0.45

Tested by 9

test_tricontourFunction · 0.64
test_tricontourfMethod · 0.64
test_wrong_use_colorizerFunction · 0.64
test_tricontourset_reuseFunction · 0.64
test_tricontourf_pathFunction · 0.64
test_bool_autolevelFunction · 0.64