This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

ContourPlot3D

Updated In 8 Graphic
ContourPlot3D
produces a three-dimensional contour plot of f as a function of x, y, and z.
ContourPlot3D
plots the contour surface for which .
  • 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 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.
AxesTruewhether to draw axes
BoundaryStyleAutomatichow to draw boundaries of regions
BoxRatios{1,1,1}bounding 3D box ratios
ColorFunctionAutomatichow to color contour surfaces
ColorFunctionScalingTruewhether to scale arguments to ColorFunction
ContoursAutomatichow many or what contour surfaces to show
ContourStyleWhitethe style for contour surfaces
EvaluationMonitorNoneexpression to evaluate at every function evaluation
MaxRecursionAutomaticthe maximum number of recursive subdivisions allowed
MeshAutomatichow many mesh lines in each direction to draw
MeshFunctions{#1&,#2&,#3&}how to determine the placement of mesh divisions
MeshShadingNonehow to shade regions between mesh divisions
MeshStyleAutomaticthe style for mesh lines
MethodAutomaticthe method to use for refining contour surfaces
NormalsFunctionAutomatichow to determine effective surface normals
PerformanceGoal$PerformanceGoalaspects of performance to try to optimize
PlotPointsAutomaticthe initial number of sample points in each direction
PlotRange{Full,Full,Full,Automatic}the range of values to include
RegionFunction(True&)how to determine whether a point should be included
TextureCoordinateFunctionAutomatichow to determine texture coordinates
TextureCoordinateScalingTruewhether to scale arguments to TextureCoordinateFunction
WorkingPrecisionMachinePrecisionthe 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.
Plot a 3D contour surface:
Plot several contour surfaces:
Use styling to emphasize features:
Plot a 3D contour surface:
In[1]:=
Click for copyable input
Out[1]=
 
Plot several contour surfaces:
In[1]:=
Click for copyable input
Out[1]=
 
Use styling to emphasize features:
In[1]:=
Click for copyable input
Out[1]=
More points are sampled where the function changes quickly:
Areas where the function becomes nonreal are excluded:
Use PlotPoints and MaxRecursion to control adaptive sampling:
Use RegionFunction to show interior features:
Add labels:
Color the surface by height:
Apply styles to a contour:
Show multiple implicit surfaces with explicit styles:
Use transparency to show interior features:
Use an overlay mesh:
Fill with different colors between mesh lines:
Use a red boundary around the edges of the contours:
Use None to omit the boundary:
BoundaryStyle applies to holes cut by RegionFunction:
Use Automatic to show the natural scale of the surface:
Color the contours according to the , , , or values:
Use a named color gradient:
ColorFunction has higher priority than ContourStyle:
Use red when :
ColorFunction has lower priority than MeshShading:
Use unscaled values to color the contours:
Use an overlay density based on the coordinate values:
Use 5 equally spaced contours:
Use automatic contour selection:
Use specific contours:
Use specific contours with specific styles:
Use transparent contours:
Use distinct colors for each contour:
Use FaceForm to get different colors on the inside and outside:
Alternate styles for contour surfaces:
Use the same style for all the equations:
Use different styles for different equations:
ColorFunction has higher priority than ContourStyle:
MeshShading has higher priority than ContourStyle:
Show where ContourPlot3D samples a function:
Count how many times is evaluated:
Refine the contour where it changes quickly:
Show the initial and final sampling meshes:
Use None to not draw any mesh:
Use 5 mesh levels in each direction:
Use 5 mesh levels in the direction and 10 in the direction:
Use mesh lines at specific values:
Use different styles for different mesh lines:
Use a mesh evenly spaced in the , , and directions:
Mesh with respect to radial distance:
Alternate red and blue sections in the direction:
MeshShading has higher priority than ContourStyle for styling:
Use ContourStyle for some segments by setting MeshShading to Automatic:
MeshShading can be used with ColorFunction:
Fill between regions defined by multiple mesh functions:
Use a dashed mesh in the direction:
Use a dashed mesh in the direction and a blue mesh in the direction:
Normals are automatically calculated:
Use None to get flat shading for all the polygons:
Vary the effective normals used on the surface:
Generate a higher-quality plot:
Emphasize performance, possibly at the cost of quality:
Use more initial points to get a smoother contour:
Show the contours over the Full , , range:
Automatically compute the , , range:
Select a region in , , and :
Remove a wedge to see hidden features:
Textures use scaled and coordinates by default:
Use the and coordinates:
Use different textures for different surfaces:
Use unscaled coordinates:
Use textures to highlight how parameters map onto a surface:
Use scaled or unscaled coordinates for textures:
Evaluate functions using machine-precision arithmetic:
Evaluate functions using arbitrary-precision arithmetic:
Ellipsoidal surfaces
Compute their volumes:
Conic surfaces
Show a sphere and hyperboloids of one and two sheets:
Use Mesh to show that a hyperbolic paraboloid is a doubly ruled surface:
An implicitly defined torus
An electrostatic potential built from a collection of point charges at positions :
Two charges and :
Two charges and :
Three charges and :
ContourPlot3D samples more points where it needs to:
Plotting an implicit surface is the same as finding the zero contour of a related function:
The orientation of the contours depends on the form of the input:
Use ListContourPlot3D for plotting data:
Use RegionPlot3D for implicit regions in three dimensions:
Use Plot3D for surfaces:
Use ParametricPlot3D for parametric curves and regions in three dimensions:
Use ContourPlot and DensityPlot for contours and densities in two dimensions:
Use increased settings for PlotPoints or MaxRecursion to capture features of a surface:
Use more initial points to capture more components of the contour surface:
For functions that are always non-negative, it is not possible to find the 0 contour:
A transcendental periodic implicit surface:
New in 6 | Last modified in 8