ContourPlot3D
ContourPlot3D[f,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]
produces a three-dimensional contour plot of f as a function of x, y, and z.
ContourPlot3D[f==g,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]
plots the contour surface for which
.
Details and Options
- The contour surfaces plotted by ContourPlot3D can contain disconnected parts.
- By default, ContourPlot3D shows each contour level as an opaque white surface, with normals pointing outward.
- ContourPlot3D treats the variables x, y, and z as local, effectively using Block.
- ContourPlot3D has attribute HoldAll and evaluates
and
only after assigning specific numerical values to x, y, and z. - In some cases, it may be more efficient to use Evaluate to evaluate
and
symbolically before specific numerical values are assigned to x, y, and z. - Nothing is plotted in any regions where
evaluates to None. - ContourPlot3D has the same options as Graphics3D, with the following additions and changes:
-
Axes True whether to draw axes BoundaryStyle Automatic how to draw boundaries of regions BoxRatios {1,1,1} bounding 3D box ratios ColorFunction Automatic how to color contour surfaces ColorFunctionScaling True whether to scale arguments to ColorFunction Contours Automatic how many or what contour surfaces to show ContourStyle White the style for contour surfaces EvaluationMonitor None expression to evaluate at every function evaluation MaxRecursion Automatic the maximum number of recursive subdivisions allowed Mesh Automatic how many mesh lines in each direction to draw MeshFunctions {#1&,#2&,#3&} how to determine the placement of mesh divisions MeshShading None how to shade regions between mesh divisions MeshStyle Automatic the style for mesh lines Method Automatic the method to use for refining contour surfaces NormalsFunction Automatic how to determine effective surface normals PerformanceGoal $PerformanceGoal aspects of performance to try to optimize PlotLegends None legends for surfaces PlotPoints Automatic the initial number of sample points in each direction PlotRange {Full,Full,Full,Automatic} the range of values to include PlotTheme $PlotTheme overall theme for the plot RegionFunction (True&) how to determine whether a point should be included TextureCoordinateFunction Automatic how to determine texture coordinates TextureCoordinateScaling True whether to scale arguments to TextureCoordinateFunction WorkingPrecision MachinePrecision the precision used in internal computations - ContourPlot3D initially evaluates
at a 3D grid of equally spaced sample points specified by PlotPoints. Then it uses an adaptive algorithm to subdivide at most MaxRecursion times to generate smooth contours. - You should realize that since it uses only a finite number of sample points, it is possible for ContourPlot3D to miss features of your functions. To check your results, you should try increasing the settings for PlotPoints and MaxRecursion.
- The arguments supplied to functions in MeshFunctions and RegionFunction are x, y, z,
. Functions in ColorFunction and TextureCoordinateFunction are by default supplied with scaled versions of these arguments. - ContourPlot3D returns Graphics3D[GraphicsComplex[data]].
- Themes that affect 3D surfaces include:
-

"DarkMesh" dark mesh lines 
"GrayMesh" gray mesh lines 
"LightMesh" light mesh lines 
"ZMesh" vertical mesh lines 
"ThickSurface" add thickness to surfaces
Examples
open allclose allSee Also
SliceContourPlot3D ListContourPlot3D RegionPlot3D ParametricPlot3D VectorPlot3D ContourPlot MeshFunctions ContourLabels ContourShading
Related Guides
Related Links
Introduced in 2007
(6.0)
| Updated in 2016 (11.0)