SliceContourPlot3D
✖
SliceContourPlot3D
generates a contour plot of f over the slice surface surf as a function of x, y, and z.
Details and Options




- SliceContourPlot3D constructs contour curves on the surface surf corresponding to the level sets where f[x,y,z] has constant values d1, d2, etc. By default, the regions between the curves are shaded to more easily identify regions whose values are between di and di+1.
- It visualizes the areas
.
- The following basic slice surfaces surfi can be given:
-
Automatic automatically determine slice surfaces "CenterPlanes" coordinate planes through the center "BackPlanes" coordinate planes at the back of the plot "XStackedPlanes" coordinate planes stacked along axis
"YStackedPlanes" coordinate planes stacked along axis
"ZStackedPlanes" coordinate planes stacked along axis
"DiagonalStackedPlanes" planes stacked diagonally "CenterSphere" a sphere in the center "CenterCutSphere" a sphere with a cutout wedge "CenterCutBox" a box with a cutout octant - SliceContourPlot3D[f,{x,xmin,xmax},…] is equivalent to SliceContourPlot3D[f,Automatic,{x,xmin,xmax},…] etc.
- The following parametrizations can be used for basic slice surfaces:
-
{"XStackedPlanes",n}, generate n equally spaced planes {"XStackedPlanes",{x1,x2,…}} generate planes for {"CenterCutSphere",ϕopen} cut angle ϕopen facing the view point {"CenterCutSphere",ϕopen,ϕcenter} cut angle ϕopen with center angle ϕcenter in the plane
- "YStackedPlanes", "ZStackedPlanes" follow the specifications for "XStackedPlanes", with additional features shown in the scope examples.
- The following general slice surfaces surfi can be used:
-
expr0 implicit equation in x, y, and z, e.g. x y z-10 surfaceregion a two-dimensional region in 3D, e.g. Hyperplane volumeregion a three-dimensional region in 3D where surfi is taken as the boundary surface, e.g. Cuboid - The following wrappers can be used for slice surfaces surfi:
-
Annotation[surf,label] provide an annotation Button[surf,action] define an action to execute when the surface is clicked EventHandler[surf,…] define a general event handler for the surface Hyperlink[surf,uri] make the surface act as a hyperlink PopupWindow[surf,cont] attach a popup window to the surface StatusArea[surf,label] display in status area when the surface is moused over Tooltip[surf,label] attach an arbitrary tooltip to the surface - SliceContourPlot3D 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 style surface boundaries BoxRatios {1,1,1} bounding 3D box ratios ClippingStyle None how to draw values clipped by PlotRange ColorFunction Automatic how to color the plot ColorFunctionScaling True whether to scale the arguments to ColorFunction Contours Automatic how many or what contours to show ContourShading Automatic how to shade regions between contours ContourStyle Automatic the style for contour lines PerformanceGoal $PerformanceGoal aspects of performance to optimize PlotLegends None legends for color gradients PlotPoints Automatic initial number of samples for the function f and slice surfaces surfi in each direction PlotRange {Full,Full,Full,Automatic} range of f or other values to include PlotTheme $PlotTheme overall theme for the plot RegionFunction (True&) how to determine whether a point should be included ScalingFunctions None how to scale individual coordinates TargetUnits Automatic desired units to use WorkingPrecision MachinePrecision the precision used in internal computations - ColorFunction is by default supplied with the scaled value of f.
- RegionFunction is by default supplied with x, y, z and f.
- Possible settings for ScalingFunctions include:
-
sf scale the f contour values {sx,sy,sz} scale x, y and z axes {sx,sy,sz,sf} scale x, y and z axes and f contour 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 -
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 style surface boundaries Boxed True whether to draw the bounding box BoxRatios {1,1,1} bounding 3D box ratios BoxStyle {} style specifications for the box ClippingStyle None how to draw values clipped by PlotRange ClipPlanes None clipping planes ClipPlanesStyle Automatic style specifications for clipping planes ColorFunction Automatic how to color the plot ColorFunctionScaling True whether to scale the arguments to ColorFunction ContentSelectable Automatic whether to allow contents to be selected Contours Automatic how many or what contours to show ContourShading Automatic how to shade regions between contours ContourStyle Automatic the style for contour lines 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 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 Method Automatic details of 3D graphics methods to use PerformanceGoal $PerformanceGoal aspects of performance to optimize PlotLabel None a label for the plot PlotLegends None legends for color gradients PlotPoints Automatic initial number of samples for the function f and slice surfaces surfi in each direction PlotRange {Full,Full,Full,Automatic} range of f or other 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 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 TargetUnits Automatic desired units to use 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 (2)Summary of the most common use cases
Scope (24)Survey of the scope of standard use cases
Surfaces (9)
Generate a contour plot over standard slice surfaces:

https://wolfram.com/xid/0tp1gh65gqu1tk-y8d13b

Standard axis-aligned stacked slice surfaces:

https://wolfram.com/xid/0tp1gh65gqu1tk-g49ifo


https://wolfram.com/xid/0tp1gh65gqu1tk-t9j4z8

Plot the contours over any surface region:

https://wolfram.com/xid/0tp1gh65gqu1tk-533t34

Plotting over a volume primitive is equivalent to plotting over RegionBoundary[reg]:

https://wolfram.com/xid/0tp1gh65gqu1tk-ldhqvm

Plot the contours over the surface :

https://wolfram.com/xid/0tp1gh65gqu1tk-7cse7o

Plot the contours over multiple surfaces:

https://wolfram.com/xid/0tp1gh65gqu1tk-cyajg1

Specify the number of stacked planes:

https://wolfram.com/xid/0tp1gh65gqu1tk-5vavq1

Specify the cutting angle for a center-cut sphere slice:

https://wolfram.com/xid/0tp1gh65gqu1tk-7ng1gh

Sampling (4)
Use Contours to specify the number of contours:

https://wolfram.com/xid/0tp1gh65gqu1tk-bfpkkk

Or the list of function values to put contours:

https://wolfram.com/xid/0tp1gh65gqu1tk-xuugwu

Areas where the function becomes nonreal are excluded:

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

Use RegionFunction to expose obscured slices:

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

The domain may be specified by a region including Cone:

https://wolfram.com/xid/0tp1gh65gqu1tk-pu0wit

A formula region including ImplicitRegion:

https://wolfram.com/xid/0tp1gh65gqu1tk-j02kuu

https://wolfram.com/xid/0tp1gh65gqu1tk-fhzvnj

A mesh-based region including BoundaryMeshRegion:

https://wolfram.com/xid/0tp1gh65gqu1tk-mn7ny


https://wolfram.com/xid/0tp1gh65gqu1tk-bf1zwg

Presentation (11)
Use PlotTheme to immediately get overall styling:

https://wolfram.com/xid/0tp1gh65gqu1tk-qpuqqo

Use PlotLegends to get a color bar for the different values:

https://wolfram.com/xid/0tp1gh65gqu1tk-rhpvcf

Control the display of axes with Axes:

https://wolfram.com/xid/0tp1gh65gqu1tk-nyudgi

Label axes using AxesLabel and the whole plot using PlotLabel:

https://wolfram.com/xid/0tp1gh65gqu1tk-j8uski

Color the plot by the function values with ColorFunction:

https://wolfram.com/xid/0tp1gh65gqu1tk-2bv1by

Style regions between contours with ContourShading:

https://wolfram.com/xid/0tp1gh65gqu1tk-brwdo2

Use ContourStyle to style the contour lines:

https://wolfram.com/xid/0tp1gh65gqu1tk-m1arsj

Style the slice surface boundaries with BoundaryStyle:

https://wolfram.com/xid/0tp1gh65gqu1tk-cyvpky

TargetUnits specifies which units to use in the visualization:

https://wolfram.com/xid/0tp1gh65gqu1tk-t4u8b6

Create a plot with a log-scaled axis:

https://wolfram.com/xid/0tp1gh65gqu1tk-24omnx

Reverse the coordinate direction in the direction:

https://wolfram.com/xid/0tp1gh65gqu1tk-l3ao9

Options (43)Common values & functionality for each option
BoundaryStyle (1)
Style the slice surface boundaries with BoundaryStyle:

https://wolfram.com/xid/0tp1gh65gqu1tk-k3afs0

BoxRatios (3)
By default, the edges of the bounding box have the same length:

https://wolfram.com/xid/0tp1gh65gqu1tk-tu0uqo

Use BoxRatios->Automatic to show the natural scale of the 3D coordinate values:

https://wolfram.com/xid/0tp1gh65gqu1tk-qtxai

Use custom length ratios for each side of the bounding box:

https://wolfram.com/xid/0tp1gh65gqu1tk-d474zo

ClippingStyle (2)

https://wolfram.com/xid/0tp1gh65gqu1tk-m7ibeu

Remove clipped regions with None:

https://wolfram.com/xid/0tp1gh65gqu1tk-qa2soa

ColorFunction (3)
ColorFunctionScaling (2)
By default, scaled values are used:

https://wolfram.com/xid/0tp1gh65gqu1tk-rrfrkq

Use ColorFunctionScalingFalse to get unscaled values:

https://wolfram.com/xid/0tp1gh65gqu1tk-g000x6

Contours (4)
Use 5 equally spaced contours:

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

Use automatic contour selection:

https://wolfram.com/xid/0tp1gh65gqu1tk-gsf8x7

Specify an explicit set of contours:

https://wolfram.com/xid/0tp1gh65gqu1tk-rjmys1

Use specific contours with specific styles:

https://wolfram.com/xid/0tp1gh65gqu1tk-ocd2kq

ContourStyle (1)
ContourShading (4)
ContourShadingAutomatic computes contour region shading from the ColorFunction:

https://wolfram.com/xid/0tp1gh65gqu1tk-52ac5a

Cyclically repeat shading styles:

https://wolfram.com/xid/0tp1gh65gqu1tk-u4k26q

Leave every third contour region empty, starting from the second:

https://wolfram.com/xid/0tp1gh65gqu1tk-858exy

Leave the regions between contours blank:

https://wolfram.com/xid/0tp1gh65gqu1tk-3g9uou

PerformanceGoal (2)
PlotLegends (4)
Add a color bar for the different values:

https://wolfram.com/xid/0tp1gh65gqu1tk-hv5wme

PlotLegends automatically picks up Contours and ContourShading values:

https://wolfram.com/xid/0tp1gh65gqu1tk-3bop1e

With the setting ContourShadingAutomatic, the colors are derived from ColorFunction:

https://wolfram.com/xid/0tp1gh65gqu1tk-6ppeoh

Control placement of the legend with Placed:

https://wolfram.com/xid/0tp1gh65gqu1tk-pqj5ip

PlotPoints (1)
PlotRange (3)
Show All contours by default:

https://wolfram.com/xid/0tp1gh65gqu1tk-uhazyj


https://wolfram.com/xid/0tp1gh65gqu1tk-hwlvlp

Show only function values between 0 and 2:

https://wolfram.com/xid/0tp1gh65gqu1tk-hjax0p

This is equivalent to the fully qualified form:

https://wolfram.com/xid/0tp1gh65gqu1tk-m0kjnp

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

https://wolfram.com/xid/0tp1gh65gqu1tk-ygbqhf

Any option setting overrides PlotTheme settings, in this case removing face grids:

https://wolfram.com/xid/0tp1gh65gqu1tk-2dqvd3

Compare different plot themes:

https://wolfram.com/xid/0tp1gh65gqu1tk-g0e9g0

RegionFunction (2)
ScalingFunctions (5)
By default, plots have linear scales in all directions:

https://wolfram.com/xid/0tp1gh65gqu1tk-52n5ur

Create a plot with a log-scaled axis:

https://wolfram.com/xid/0tp1gh65gqu1tk-rgmd7s

Use ScalingFunctions to scale to reverse the coordinate direction in the direction:

https://wolfram.com/xid/0tp1gh65gqu1tk-47658g

Use a scale defined by a function and its inverse:

https://wolfram.com/xid/0tp1gh65gqu1tk-7lj6h6

Slice surfaces that are defined relative to the bounding box are unaffected by scaling functions:

https://wolfram.com/xid/0tp1gh65gqu1tk-vw38w5

TargetUnits (2)
Axes and legends are labeled with the units specified by TargetUnits:

https://wolfram.com/xid/0tp1gh65gqu1tk-qo473z

Units specified by Quantity are converted to those specified by TargetUnits:

https://wolfram.com/xid/0tp1gh65gqu1tk-6qstx3

Applications (17)Sample problems that can be solved with this function
Elementary Functions (4)

https://wolfram.com/xid/0tp1gh65gqu1tk-c1wwxq


https://wolfram.com/xid/0tp1gh65gqu1tk-kkv9gr


https://wolfram.com/xid/0tp1gh65gqu1tk-lt4pqt


https://wolfram.com/xid/0tp1gh65gqu1tk-ou5i2


https://wolfram.com/xid/0tp1gh65gqu1tk-ca0wen


https://wolfram.com/xid/0tp1gh65gqu1tk-p1zn1

Plot , a product of univariate functions:

https://wolfram.com/xid/0tp1gh65gqu1tk-cnfe6k

https://wolfram.com/xid/0tp1gh65gqu1tk-pqgfdc

Plot and
, univariate and bivariate functions:

https://wolfram.com/xid/0tp1gh65gqu1tk-nylmyx


https://wolfram.com/xid/0tp1gh65gqu1tk-dvwij4


https://wolfram.com/xid/0tp1gh65gqu1tk-l4zx6v

https://wolfram.com/xid/0tp1gh65gqu1tk-5fx0vo

Pick the points randomly in a box:

https://wolfram.com/xid/0tp1gh65gqu1tk-fz9nz1

https://wolfram.com/xid/0tp1gh65gqu1tk-qvme8b

Distribution Functions (6)
Plot the PDF of a distribution:

https://wolfram.com/xid/0tp1gh65gqu1tk-81fcz8

https://wolfram.com/xid/0tp1gh65gqu1tk-v7omgq

Simulate the distribution and show point distribution:

https://wolfram.com/xid/0tp1gh65gqu1tk-gm668q

https://wolfram.com/xid/0tp1gh65gqu1tk-fg91iz

Plot the CDF of a distribution:

https://wolfram.com/xid/0tp1gh65gqu1tk-nxzhru

https://wolfram.com/xid/0tp1gh65gqu1tk-yt2zy

The SurvivalFunction:

https://wolfram.com/xid/0tp1gh65gqu1tk-edamg1

https://wolfram.com/xid/0tp1gh65gqu1tk-qx27e1

The HazardFunction:

https://wolfram.com/xid/0tp1gh65gqu1tk-cexal0

https://wolfram.com/xid/0tp1gh65gqu1tk-n33x61

Explore Correlation parameters for a MultinormalDistribution, where ρab is the correlation between a and b:

https://wolfram.com/xid/0tp1gh65gqu1tk-ebuscf
Correlation between x and y only:

https://wolfram.com/xid/0tp1gh65gqu1tk-cjos6v

https://wolfram.com/xid/0tp1gh65gqu1tk-ddnesr

Correlation between y and z only:

https://wolfram.com/xid/0tp1gh65gqu1tk-c1wejj

https://wolfram.com/xid/0tp1gh65gqu1tk-cime7c

Correlation between y and z only, but larger variance in the z component:

https://wolfram.com/xid/0tp1gh65gqu1tk-f3rc7e

https://wolfram.com/xid/0tp1gh65gqu1tk-eqsrfd

Visualize the PDF of a ProductDistribution:

https://wolfram.com/xid/0tp1gh65gqu1tk-kiukzo


https://wolfram.com/xid/0tp1gh65gqu1tk-5jjcws

A product of three different distributions:

https://wolfram.com/xid/0tp1gh65gqu1tk-d59pdt


https://wolfram.com/xid/0tp1gh65gqu1tk-occsfc

A product of bivariate and univariate distributions:

https://wolfram.com/xid/0tp1gh65gqu1tk-grjaas


https://wolfram.com/xid/0tp1gh65gqu1tk-cffc9p

Plot the pdf of a CopulaDistribution:

https://wolfram.com/xid/0tp1gh65gqu1tk-jkj62p


https://wolfram.com/xid/0tp1gh65gqu1tk-e6pr6h

Visualize the PDF of a kernel density estimate of some trivariate data:

https://wolfram.com/xid/0tp1gh65gqu1tk-bw70il

https://wolfram.com/xid/0tp1gh65gqu1tk-czjlu4

Potential and Wave Functions (4)
Plot the phase using color on the isosurface of a quadrupole potential:

https://wolfram.com/xid/0tp1gh65gqu1tk-etkey6

https://wolfram.com/xid/0tp1gh65gqu1tk-3d0i0n

Alternatively, show the on several planes:

https://wolfram.com/xid/0tp1gh65gqu1tk-47h6ws

Plot spherical waves from three sources
in space:

https://wolfram.com/xid/0tp1gh65gqu1tk-nt1afr


https://wolfram.com/xid/0tp1gh65gqu1tk-gypc0b

Plot hydrogen orbital densities for quantum numbers ,
,
:

https://wolfram.com/xid/0tp1gh65gqu1tk-sl8x2o


https://wolfram.com/xid/0tp1gh65gqu1tk-csopkl

https://wolfram.com/xid/0tp1gh65gqu1tk-mfxobq


https://wolfram.com/xid/0tp1gh65gqu1tk-mqewd6

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

https://wolfram.com/xid/0tp1gh65gqu1tk-uu22nj

https://wolfram.com/xid/0tp1gh65gqu1tk-bcu9xj


https://wolfram.com/xid/0tp1gh65gqu1tk-gyax69


https://wolfram.com/xid/0tp1gh65gqu1tk-kr4jq4


https://wolfram.com/xid/0tp1gh65gqu1tk-jsa59j

Partial Differential Equations (3)
Visualize a nonlinear sine-Gordon equation in two spatial dimensions with periodic boundary conditions with time represented along the z axis:

https://wolfram.com/xid/0tp1gh65gqu1tk-3imqic

The solution evolves in time along the z axis:

https://wolfram.com/xid/0tp1gh65gqu1tk-o5fvxw

Visualize Wolfram's nonlinear wave equation in two spatial dimensions with time represented along the z axis:

https://wolfram.com/xid/0tp1gh65gqu1tk-fkj


https://wolfram.com/xid/0tp1gh65gqu1tk-s7i4od

Visualize solutions to 3D partial differential equations. In this case, a Poisson equation over a Ball and Dirichlet boundary conditions:

https://wolfram.com/xid/0tp1gh65gqu1tk-yfl4db


https://wolfram.com/xid/0tp1gh65gqu1tk-4pd8oc

Properties & Relations (5)Properties of the function, and connections to other functions
Use SliceDensityPlot3D for continuous densities on surfaces:

https://wolfram.com/xid/0tp1gh65gqu1tk-y3eawx

Use ContourPlot3D for constant value surfaces:

https://wolfram.com/xid/0tp1gh65gqu1tk-4gfzgs

Use DensityPlot3D for full volume visualization of the function values:

https://wolfram.com/xid/0tp1gh65gqu1tk-4kw5kb

Use ListSliceContourPlot3D for data:

https://wolfram.com/xid/0tp1gh65gqu1tk-ywzg95

https://wolfram.com/xid/0tp1gh65gqu1tk-3v60u6

Use ContourPlot for contour plots in 2D:

https://wolfram.com/xid/0tp1gh65gqu1tk-z3puov

Possible Issues (1)Common pitfalls and unexpected behavior
Slice surfaces with a constant value may appear noisy:

https://wolfram.com/xid/0tp1gh65gqu1tk-7erc6o

The function is constant on the chosen slice surface:

https://wolfram.com/xid/0tp1gh65gqu1tk-fc2de6

Choosing a different slice surface gives a reasonable picture of the function:

https://wolfram.com/xid/0tp1gh65gqu1tk-g7n0o8

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