WOLFRAM

SliceContourPlot3D[f,surf,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]

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

SliceContourPlot3D[f,surf,{x,y,z}reg]

restricts the surface to be within region reg.

SliceContourPlot3D[f,{surf1,surf2,},]

generates contour plots over several slices.

Details and Options

Examples

open allclose all

Basic Examples  (2)Summary of the most common use cases

Plot the contours of the function over slice planes through the center:

Out[1]=1

Plot the contours over the surface :

Out[1]=1

Scope  (24)Survey of the scope of standard use cases

Surfaces  (9)

Generate a contour plot over standard slice surfaces:

Out[1]=1

Standard axis-aligned stacked slice surfaces:

Out[1]=1

Standard boundary surfaces:

Out[1]=1

Plot the contours over any surface region:

Out[1]=1

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

Out[1]=1

Plot the contours over the surface :

Out[1]=1

Plot the contours over multiple surfaces:

Out[1]=1

Specify the number of stacked planes:

Out[1]=1

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

Out[1]=1

Sampling  (4)

Use Contours to specify the number of contours:

Out[1]=1

Or the list of function values to put contours:

Out[2]=2

Areas where the function becomes nonreal are excluded:

Out[1]=1

Use RegionFunction to expose obscured slices:

Out[1]=1

The domain may be specified by a region including Cone:

Out[1]=1

A formula region including ImplicitRegion:

Out[3]=3

A mesh-based region including BoundaryMeshRegion:

Out[4]=4
Out[5]=5

Presentation  (11)

Use PlotTheme to immediately get overall styling:

Out[1]=1

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

Out[1]=1

Control the display of axes with Axes:

Out[1]=1

Label axes using AxesLabel and the whole plot using PlotLabel:

Out[1]=1

Color the plot by the function values with ColorFunction:

Out[1]=1

Style regions between contours with ContourShading:

Out[1]=1

Use ContourStyle to style the contour lines:

Out[1]=1

Style the slice surface boundaries with BoundaryStyle:

Out[1]=1

TargetUnits specifies which units to use in the visualization:

Out[1]=1

Create a plot with a log-scaled axis:

Out[1]=1

Reverse the coordinate direction in the direction:

Out[1]=1

Options  (43)Common values & functionality for each option

BoundaryStyle  (1)

Style the slice surface boundaries with BoundaryStyle:

Out[1]=1

BoxRatios  (3)

By default, the edges of the bounding box have the same length:

Out[1]=1

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

Out[1]=1

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

Out[1]=1

ClippingStyle  (2)

Color clipped regions:

Out[1]=1

Remove clipped regions with None:

Out[1]=1

ColorFunction  (3)

Color the contours according to the values:

Out[1]=1

Use a named color gradient:

Out[1]=1

Use red when :

Out[1]=1

ColorFunctionScaling  (2)

By default, scaled values are used:

Out[1]=1

Use ColorFunctionScalingFalse to get unscaled values:

Out[1]=1

Contours  (4)

Use 5 equally spaced contours:

Out[1]=1

Use automatic contour selection:

Out[1]=1

Specify an explicit set of contours:

Out[1]=1

Use specific contours with specific styles:

Out[1]=1

ContourStyle  (1)

Specify a style for all contours:

Out[1]=1

ContourShading  (4)

ContourShadingAutomatic computes contour region shading from the ColorFunction:

Out[1]=1

Cyclically repeat shading styles:

Out[1]=1

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

Out[1]=1

Leave the regions between contours blank:

Out[1]=1

PerformanceGoal  (2)

Generate a higher-quality plot:

Out[1]=1

Emphasize performance, possibly at the cost of quality:

Out[1]=1

PlotLegends  (4)

Add a color bar for the different values:

Out[1]=1

PlotLegends automatically picks up Contours and ContourShading values:

Out[1]=1

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

Out[1]=1

Control placement of the legend with Placed:

Out[1]=1

PlotPoints  (1)

Use more plot points to get a smoother contour:

Out[1]=1

PlotRange  (3)

Show All contours by default:

Out[1]=1

Show a select range:

Out[1]=1

Show only function values between 0 and 2:

Out[1]=1

This is equivalent to the fully qualified form:

Out[2]=2

PlotTheme  (3)

Use a theme with detailed grid lines, ticks, and legends:

Out[1]=1

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

Out[1]=1

Compare different plot themes:

Out[1]=1

RegionFunction  (2)

Include only the contours where or :

Out[1]=1

Include only the contours where :

Out[1]=1

ScalingFunctions  (5)

By default, plots have linear scales in all directions:

Out[1]=1

Create a plot with a log-scaled axis:

Out[1]=1

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

Out[1]=1

Use a scale defined by a function and its inverse:

Out[1]=1

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

Out[1]=1

TargetUnits  (2)

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

Out[1]=1

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

Out[1]=1

WorkingPrecision  (1)

Evaluate functions using machine-precision arithmetic:

Out[1]=1

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

Elementary Functions  (4)

Plot the function :

Out[1]=1

Plot the functions and :

Out[2]=2

Plot the functions and :

Out[3]=3

Plot the functions and :

Out[4]=4

Plot the functions and :

Out[1]=1

Plot the functions and :

Out[2]=2

Plot , a product of univariate functions:

Out[2]=2

Plot and , univariate and bivariate functions:

Out[3]=3

Plot , a trivariate function:

Out[4]=4

Plot a sum of exponentials sum_ialpha_i exp(-TemplateBox[{{p, -, {p, _, i}}}, Norm]^2):

Out[2]=2

Pick the points randomly in a box:

Out[4]=4

Distribution Functions  (6)

Plot the PDF of a distribution:

Out[3]=3

Simulate the distribution and show point distribution:

Out[5]=5

Plot the CDF of a distribution:

Out[2]=2

The SurvivalFunction:

Out[4]=4

The HazardFunction:

Out[6]=6

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

Correlation between x and y only:

Out[3]=3

Correlation between y and z only:

Out[5]=5

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

Out[7]=7

Visualize the PDF of a ProductDistribution:

Out[1]=1
Out[2]=2

A product of three different distributions:

Out[3]=3
Out[4]=4

A product of bivariate and univariate distributions:

Out[5]=5
Out[6]=6

Plot the pdf of a CopulaDistribution:

Out[1]=1
Out[2]=2

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

Out[2]=2

Potential and Wave Functions  (4)

Plot the phase using color on the isosurface of a quadrupole potential:

Out[2]=2

Alternatively, show the 17<=TemplateBox[{f}, Abs]<=21 on several planes:

Out[3]=3

Plot spherical waves cos(omega TemplateBox[{{p, -, {p, _, i}}}, Norm]) from three sources in space:

Out[1]=1
Out[2]=2

Plot hydrogen orbital densities for quantum numbers , , :

Out[1]=1

Plot :

Out[3]=3

Plot :

Out[4]=4

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

Two charges and :

Out[3]=3

Plot iso charge surfaces:

Out[4]=4

Show them together:

Out[5]=5

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:

Out[2]=2

The solution evolves in time along the z axis:

Out[3]=3

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

Out[1]=1
Out[2]=2

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

Out[1]=1
Out[2]=2

Properties & Relations  (5)Properties of the function, and connections to other functions

Use SliceDensityPlot3D for continuous densities on surfaces:

Out[1]=1

Use ContourPlot3D for constant value surfaces:

Out[1]=1

Use DensityPlot3D for full volume visualization of the function values:

Out[1]=1

Use ListSliceContourPlot3D for data:

Out[2]=2

Use ContourPlot for contour plots in 2D:

Out[1]=1

Possible Issues  (1)Common pitfalls and unexpected behavior

Slice surfaces with a constant value may appear noisy:

Out[1]=1

The function is constant on the chosen slice surface:

Out[2]=2

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

Out[3]=3
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).

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 ]}

@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 ]}

@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 ]}