ContourPlot3D
✖
ContourPlot3D
produces a three-dimensional contour plot of f as a function of x, y, and z.
plots the contour surface for which .
Details and Options




- ContourPlot3D is also known as an isosurface or level set plot.
- When given a function f, ContourPlot3D constructs contour surfaces corresponding to the level surfaces where f[x,y,z] has constant values d1, d2, etc.
- It visualizes the surfaces
.
- When given equations f==g, ContourPlot3D shows the surfaces of {x,y,z} that satisfy the equation.
- It visualizes the surface
.
- ContourPlot3D treats the variables x, y, and z as local, effectively using Block.
- ContourPlot3D has attribute HoldAll and evaluates f and g after assigning numerical values to x, y and z. In some cases, it may be more efficient to use Evaluate to evaluate f and g symbolically first.
- ContourPlot3D has the same options as Graphics3D, with the following additions and changes: [List of all options]
-
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 RegionBoundaryStyle Automatic the style for region boundaries ScalingFunctions None how to scale individual coordinates 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 f 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, f. Functions in ColorFunction and TextureCoordinateFunction are by default supplied with scaled versions of these arguments.
- Possible settings for ScalingFunctions include:
-
sf scale the fcontour values {sx,sy,sz} scale x, y and z axes {sx,sy,sz,sf} scale x, y and z axes and fcontour values - Common built-in scaling functions s include:
-
"Log" log scale with automatic tick labeling "Log10" base-10 log scale with powers of 10 for ticks "SignedLog" log-like scale that includes 0 and negative numbers "Reverse" reverse the coordinate direction "Infinite" infinite scale - ContourPlot3D returns Graphics3D[GraphicsComplex[data]].
- Themes that affect 3D surfaces include:
-
"DarkMesh" dark mesh lines "GrayMesh" gray mesh lines "LightMesh" light mesh lines "ZMesh" vertically distributed mesh lines "ThickSurface" add thickness to surfaces -
AlignmentPoint Center the default point in the graphic to align with AspectRatio Automatic ratio of height to width Axes True whether to draw axes AxesEdge Automatic on which edges to put axes AxesLabel None axes labels AxesOrigin Automatic where axes should cross AxesStyle {} graphics directives to specify the style for axes Background None background color for the plot BaselinePosition Automatic how to align with a surrounding text baseline BaseStyle {} base style specifications for the graphic BoundaryStyle Automatic how to draw boundaries of regions Boxed True whether to draw the bounding box BoxRatios {1,1,1} bounding 3D box ratios BoxStyle {} style specifications for the box ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes ColorFunction Automatic how to color contour surfaces ColorFunctionScaling True whether to scale arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected Contours Automatic how many or what contour surfaces to show ContourStyle White the style for contour surfaces ControllerLinking False when to link to external rotation controllers ControllerPath Automatic what external controllers to try to use Epilog {} 2D graphics primitives to be rendered after the main plot EvaluationMonitor None expression to evaluate at every function evaluation FaceGrids None grid lines to draw on the bounding box FaceGridsStyle {} style specifications for face grids FormatType TraditionalForm default format type for text ImageMargins 0. the margins to leave around the graphic ImagePadding All what extra padding to allow for labels, etc. ImageSize Automatic absolute size at which to render the graphic LabelStyle {} style specifications for labels Lighting Automatic simulated light sources to use 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 PlotLabel None a label for the plot 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 PlotRangePadding Automatic how much to pad the range of values PlotRegion Automatic final display region to be filled PlotTheme $PlotTheme overall theme for the plot PreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphic Prolog {} 2D graphics primitives to be rendered before the main plot RegionBoundaryStyle Automatic the style for region boundaries RegionFunction (True&) how to determine whether a point should be included RotationAction "Fit" how to render after interactive rotation ScalingFunctions None how to scale individual coordinates SphericalRegion Automatic whether to make the circumscribing sphere fit in the final display area TextureCoordinateFunction Automatic how to determine texture coordinates TextureCoordinateScaling True whether to scale arguments to TextureCoordinateFunction Ticks Automatic specification for ticks TicksStyle {} style specification for ticks TouchscreenAutoZoom False whether to zoom to fullscreen when activated on a touchscreen ViewAngle Automatic angle of the field of view ViewCenter Automatic point to display at the center ViewMatrix Automatic explicit transformation matrix ViewPoint {1.3,-2.4,2.} viewing position ViewProjection Automatic projection method for rendering objects distant from the viewer ViewRange All range of viewing distances to include ViewVector Automatic position and direction of a simulated camera ViewVertical {0,0,1} direction to make vertical WorkingPrecision MachinePrecision the precision used in internal computations


List of all options




Examples
open allclose allBasic Examples (4)Summary of the most common use cases

https://wolfram.com/xid/0d6eyml5tk-q8d

Plot several contour surfaces:

https://wolfram.com/xid/0d6eyml5tk-qy4

Plot contours over a ball with radius three:

https://wolfram.com/xid/0d6eyml5tk-m3lhfu

Use styling to emphasize features:

https://wolfram.com/xid/0d6eyml5tk-ejd5tk

Scope (16)Survey of the scope of standard use cases
Sampling (6)

https://wolfram.com/xid/0d6eyml5tk-35ec88

Plot over an implicitly defined region:

https://wolfram.com/xid/0d6eyml5tk-wckcca

More points are sampled where the function changes quickly:

https://wolfram.com/xid/0d6eyml5tk-wu7rof

Areas where the function becomes nonreal are excluded:

https://wolfram.com/xid/0d6eyml5tk-q5mv44

Use PlotPoints and MaxRecursion to control adaptive sampling:

https://wolfram.com/xid/0d6eyml5tk-bcgguk

Use RegionFunction to show interior features:

https://wolfram.com/xid/0d6eyml5tk-dhqoa

Presentation (10)

https://wolfram.com/xid/0d6eyml5tk-4lopfb


https://wolfram.com/xid/0d6eyml5tk-wt7htg


https://wolfram.com/xid/0d6eyml5tk-4dfzaz

Show multiple implicit surfaces with explicit styles:

https://wolfram.com/xid/0d6eyml5tk-j8i160


https://wolfram.com/xid/0d6eyml5tk-gfnv7y

Use transparency to show interior features:

https://wolfram.com/xid/0d6eyml5tk-px6dsx


https://wolfram.com/xid/0d6eyml5tk-s1vmo

Fill with different colors between mesh lines:

https://wolfram.com/xid/0d6eyml5tk-yh9f0m

Legend styles with contour values automatically:

https://wolfram.com/xid/0d6eyml5tk-4dd5qr

Legend contours with expressions:

https://wolfram.com/xid/0d6eyml5tk-elhh7f

Use a theme with dark background in a high-contrast color scheme:

https://wolfram.com/xid/0d6eyml5tk-u0vdu

Reverse the scale on the axis:

https://wolfram.com/xid/0d6eyml5tk-z8oyv0

Options (74)Common values & functionality for each option
BoundaryStyle (3)
Use a red boundary around the edges of the contours:

https://wolfram.com/xid/0d6eyml5tk-ui1ujw

Use None to omit the boundary:

https://wolfram.com/xid/0d6eyml5tk-lttty1

BoundaryStyle applies to holes cut by RegionFunction:

https://wolfram.com/xid/0d6eyml5tk-k3fpur

BoxRatios (1)
Use Automatic to show the natural scale of the surface:

https://wolfram.com/xid/0d6eyml5tk-fvrk37


https://wolfram.com/xid/0d6eyml5tk-bds3d7

ColorFunction (5)
Color the contours according to the ,
,
, or
values:

https://wolfram.com/xid/0d6eyml5tk-dpzinv


https://wolfram.com/xid/0d6eyml5tk-ysianv

ColorFunction has higher priority than ContourStyle:

https://wolfram.com/xid/0d6eyml5tk-n3ashl


https://wolfram.com/xid/0d6eyml5tk-ugscb

ColorFunction has lower priority than MeshShading:

https://wolfram.com/xid/0d6eyml5tk-2p37iq

ColorFunctionScaling (2)
Contours (4)
Use 5 equally spaced contours:

https://wolfram.com/xid/0d6eyml5tk-8qd9h1

Use automatic contour selection:

https://wolfram.com/xid/0d6eyml5tk-v80198


https://wolfram.com/xid/0d6eyml5tk-bcxh3w

Use specific contours with specific styles:

https://wolfram.com/xid/0d6eyml5tk-k6j4c5

ContourStyle (8)

https://wolfram.com/xid/0d6eyml5tk-h71fo8

Use distinct colors for each contour:

https://wolfram.com/xid/0d6eyml5tk-nm6eh8

Use FaceForm to get different colors on the inside and outside:

https://wolfram.com/xid/0d6eyml5tk-bchqj2

Alternate styles for contour surfaces:

https://wolfram.com/xid/0d6eyml5tk-ue2rf7

Use the same style for all the equations:

https://wolfram.com/xid/0d6eyml5tk-uj0rsf

Use different styles for different equations:

https://wolfram.com/xid/0d6eyml5tk-tlevr0

ColorFunction has higher priority than ContourStyle:

https://wolfram.com/xid/0d6eyml5tk-15l4a7

MeshShading has higher priority than ContourStyle:

https://wolfram.com/xid/0d6eyml5tk-xe1lxb

EvaluationMonitor (2)
Show where ContourPlot3D samples a function:

https://wolfram.com/xid/0d6eyml5tk-husmjq

Count how many times is evaluated:

https://wolfram.com/xid/0d6eyml5tk-c1heav

MaxRecursion (1)
Mesh (6)
Show the initial and final sampling meshes:

https://wolfram.com/xid/0d6eyml5tk-klbgrw

Use None to not draw any mesh:

https://wolfram.com/xid/0d6eyml5tk-r1je4o

Use 5 mesh levels in each direction:

https://wolfram.com/xid/0d6eyml5tk-g2u


https://wolfram.com/xid/0d6eyml5tk-s5fc5i

Use 5 mesh levels in the direction and 10 in the
direction:

https://wolfram.com/xid/0d6eyml5tk-e02x6c


https://wolfram.com/xid/0d6eyml5tk-7keyfq

Use mesh lines at specific values:

https://wolfram.com/xid/0d6eyml5tk-qkq633

Use different styles for different mesh lines:

https://wolfram.com/xid/0d6eyml5tk-9kwnuy

MeshFunctions (2)
MeshShading (5)
Alternate red and blue sections in the direction:

https://wolfram.com/xid/0d6eyml5tk-0cxb3n

MeshShading has higher priority than ContourStyle for styling:

https://wolfram.com/xid/0d6eyml5tk-7l5k1g

Use ContourStyle for some segments by setting MeshShading to Automatic:

https://wolfram.com/xid/0d6eyml5tk-st3m0g

MeshShading can be used with ColorFunction:

https://wolfram.com/xid/0d6eyml5tk-kvyovy

Fill between regions defined by multiple mesh functions:

https://wolfram.com/xid/0d6eyml5tk-fmrvn8

MeshStyle (2)
NormalsFunction (3)
Normals are automatically calculated:

https://wolfram.com/xid/0d6eyml5tk-1f7yw7

Use None to get flat shading for all the polygons:

https://wolfram.com/xid/0d6eyml5tk-w76mq3

Vary the effective normals used on the surface:

https://wolfram.com/xid/0d6eyml5tk-bf0msq

PerformanceGoal (2)
PlotLegends (3)

https://wolfram.com/xid/0d6eyml5tk-ycj612

Use Placed to change legend placement:

https://wolfram.com/xid/0d6eyml5tk-l3v92h

Use SwatchLegend to modify the legend:

https://wolfram.com/xid/0d6eyml5tk-mu94ai

PlotPoints (1)
PlotRange (2)
Show the contours over the Full ,
,
range:

https://wolfram.com/xid/0d6eyml5tk-8qbg2e

Automatically compute the ,
,
range:

https://wolfram.com/xid/0d6eyml5tk-nkh0sr

PlotTheme (4)
Use a theme with detailed grid lines, ticks, and legends:

https://wolfram.com/xid/0d6eyml5tk-x0h545


https://wolfram.com/xid/0d6eyml5tk-t0m0wq

Use a theme with minimal styling:

https://wolfram.com/xid/0d6eyml5tk-iz9d30

Create a thick surface for 3D printing:

https://wolfram.com/xid/0d6eyml5tk-1r8o36

RegionFunction (2)
RegionBoundaryStyle (4)
Show the region being plotted:

https://wolfram.com/xid/0d6eyml5tk-pjcf9a

Show the region defined by a region function:

https://wolfram.com/xid/0d6eyml5tk-sp3kab

Use None to not draw the region:

https://wolfram.com/xid/0d6eyml5tk-nrugs

Use a custom RegionBoundaryStyle:

https://wolfram.com/xid/0d6eyml5tk-igan8w

ScalingFunctions (4)
By default, ContourPlot3D uses linear scales in all directions:

https://wolfram.com/xid/0d6eyml5tk-uo8hbd

Use a log scale in the direction:

https://wolfram.com/xid/0d6eyml5tk-9b53o

Reverse the coordinate direction of the axis:

https://wolfram.com/xid/0d6eyml5tk-g1r9h2

Use a scale defined by a function, specifying the function and its inverse:

https://wolfram.com/xid/0d6eyml5tk-6srci

TextureCoordinateFunction (5)
Textures use scaled and
coordinates by default:

https://wolfram.com/xid/0d6eyml5tk-tpzt5a


https://wolfram.com/xid/0d6eyml5tk-88ic21

Use different textures for different surfaces:

https://wolfram.com/xid/0d6eyml5tk-np7j13


https://wolfram.com/xid/0d6eyml5tk-8ybp0p

Use textures to highlight how parameters map onto a surface:

https://wolfram.com/xid/0d6eyml5tk-9r5psj


https://wolfram.com/xid/0d6eyml5tk-tl4b7v

TextureCoordinateScaling (1)
Applications (5)Sample problems that can be solved with this function
Ellipsoidal surfaces [more info]:

https://wolfram.com/xid/0d6eyml5tk-g6xw00


https://wolfram.com/xid/0d6eyml5tk-eoxkux


https://wolfram.com/xid/0d6eyml5tk-ch24b9

Conic surfaces [more info]:

https://wolfram.com/xid/0d6eyml5tk-bijl2k

Show a sphere and hyperboloids of one and two sheets:

https://wolfram.com/xid/0d6eyml5tk-00npja

Use Mesh to show that a hyperbolic paraboloid is a doubly ruled surface:

https://wolfram.com/xid/0d6eyml5tk-5v9thz

An implicitly defined torus [more info]:

https://wolfram.com/xid/0d6eyml5tk-fwacs8

https://wolfram.com/xid/0d6eyml5tk-dqwy4r


https://wolfram.com/xid/0d6eyml5tk-il5to

An electrostatic potential built from a collection of point charges at positions
:

https://wolfram.com/xid/0d6eyml5tk-cygeuh

https://wolfram.com/xid/0d6eyml5tk-c2m83w


https://wolfram.com/xid/0d6eyml5tk-ecsz4b


https://wolfram.com/xid/0d6eyml5tk-km4bmf


https://wolfram.com/xid/0d6eyml5tk-fbfn1b

Properties & Relations (8)Properties of the function, and connections to other functions
ContourPlot3D samples more points where it needs to:

https://wolfram.com/xid/0d6eyml5tk-bqp8jo

Plotting an implicit surface is the same as finding the zero contour of a related function:

https://wolfram.com/xid/0d6eyml5tk-h9puxw

The orientation of the contours depends on the form of the input:

https://wolfram.com/xid/0d6eyml5tk-fy9m0q


https://wolfram.com/xid/0d6eyml5tk-qfa2dj

Use ListContourPlot3D for plotting data:

https://wolfram.com/xid/0d6eyml5tk-bqcwrd

https://wolfram.com/xid/0d6eyml5tk-e0m772

Use RegionPlot3D for implicit regions in three dimensions:

https://wolfram.com/xid/0d6eyml5tk-g4kbki

Use Plot3D for surfaces:

https://wolfram.com/xid/0d6eyml5tk-8d5lk0

Use ParametricPlot3D for parametric curves and regions in three dimensions:

https://wolfram.com/xid/0d6eyml5tk-fuibr

Use ContourPlot and DensityPlot for contours and densities in two dimensions:

https://wolfram.com/xid/0d6eyml5tk-jujphh

Possible Issues (3)Common pitfalls and unexpected behavior
Use increased settings for PlotPoints or MaxRecursion to capture features of a surface:

https://wolfram.com/xid/0d6eyml5tk-638zuy


https://wolfram.com/xid/0d6eyml5tk-25j9db

Use more initial points to capture more components of the contour surface:

https://wolfram.com/xid/0d6eyml5tk-xbfup3


https://wolfram.com/xid/0d6eyml5tk-rfco80

For functions that are always non-negative, it is not possible to find the 0 contour:

https://wolfram.com/xid/0d6eyml5tk-gxghnx

Wolfram Research (2007), ContourPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ContourPlot3D.html (updated 2022).
Text
Wolfram Research (2007), ContourPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ContourPlot3D.html (updated 2022).
Wolfram Research (2007), ContourPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ContourPlot3D.html (updated 2022).
CMS
Wolfram Language. 2007. "ContourPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ContourPlot3D.html.
Wolfram Language. 2007. "ContourPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ContourPlot3D.html.
APA
Wolfram Language. (2007). ContourPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ContourPlot3D.html
Wolfram Language. (2007). ContourPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ContourPlot3D.html
BibTeX
@misc{reference.wolfram_2025_contourplot3d, author="Wolfram Research", title="{ContourPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/ContourPlot3D.html}", note=[Accessed: 25-March-2025
]}
BibLaTeX
@online{reference.wolfram_2025_contourplot3d, organization={Wolfram Research}, title={ContourPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/ContourPlot3D.html}, note=[Accessed: 25-March-2025
]}