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

Method contour

lib/mpl_toolkits/mplot3d/axes3d.py:2869–2909  ·  view source on GitHub ↗

Create a 3D contour plot. Parameters ---------- X, Y, Z : array-like, Input data. See `.Axes.contour` for supported data shapes. extend3d : bool, default: False Whether to extend contour in 3D. stride : int, default: 5

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

Source from the content-addressed store, hash-verified

2867
2868 @_preprocess_data()
2869 def contour(self, X, Y, Z, *args,
2870 extend3d=False, stride=5, zdir='z', offset=None, axlim_clip=False,
2871 **kwargs):
2872 """
2873 Create a 3D contour plot.
2874
2875 Parameters
2876 ----------
2877 X, Y, Z : array-like,
2878 Input data. See `.Axes.contour` for supported data shapes.
2879 extend3d : bool, default: False
2880 Whether to extend contour in 3D.
2881 stride : int, default: 5
2882 Step size for extending contour.
2883 zdir : {'x', 'y', 'z'}, default: 'z'
2884 The direction to use.
2885 offset : float, optional
2886 If specified, plot a projection of the contour lines at this
2887 position in a plane normal to *zdir*.
2888 axlim_clip : bool, default: False
2889 Whether to hide lines with a vertex outside the axes view limits.
2890
2891 .. versionadded:: 3.10
2892 data : indexable object, optional
2893 DATA_PARAMETER_PLACEHOLDER
2894
2895 *args, **kwargs
2896 Other arguments are forwarded to `matplotlib.axes.Axes.contour`.
2897
2898 Returns
2899 -------
2900 matplotlib.contour.QuadContourSet
2901 """
2902 had_data = self.has_data()
2903
2904 jX, jY, jZ = art3d.rotate_axes(X, Y, Z, zdir)
2905 cset = super().contour(jX, jY, jZ, *args, **kwargs)
2906 self.add_contour_set(cset, extend3d, stride, zdir, offset, axlim_clip)
2907
2908 self.auto_scale_xyz(X, Y, Z, had_data)
2909 return cset
2910
2911 contour3D = contour
2912

Callers 6

test_contour3dFunction · 0.45
test_contour3d_extend3dFunction · 0.45
test_contour3d_1d_inputFunction · 0.45
test_scale3d_artists_logFunction · 0.45

Calls 3

add_contour_setMethod · 0.95
auto_scale_xyzMethod · 0.95
has_dataMethod · 0.80

Tested by 6

test_contour3dFunction · 0.36
test_contour3d_extend3dFunction · 0.36
test_contour3d_1d_inputFunction · 0.36
test_scale3d_artists_logFunction · 0.36