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)
| 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 |