SliceDensityPlot3D [f,surf,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]
generates a density plot of f over the slice surface surf as a function of x, y, and z.
SliceDensityPlot3D [f,surf,{x,y,z}∈reg]
restricts the surface to be within region reg.
SliceDensityPlot3D [f,{surf1,surf2,…},…]
generates density plots over several slices.
SliceDensityPlot3D
SliceDensityPlot3D [f,surf,{x,xmin,xmax},{y,ymin,ymax},{z,zmin,zmax}]
generates a density plot of f over the slice surface surf as a function of x, y, and z.
SliceDensityPlot3D [f,surf,{x,y,z}∈reg]
restricts the surface to be within region reg.
SliceDensityPlot3D [f,{surf1,surf2,…},…]
generates density plots over several slices.
Details and Options
- SliceDensityPlot3D evaluates f at values of x, y and z on a surface surf and uses a color function to map each value f[x,y,z] to a color.
- The plot visualizes the set , where is a color function.
- 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
- SliceDensityPlot3D [f,{x,xmin,xmax},…] is equivalent to SliceDensityPlot3D [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 x=xi{"CenterCutSphere",ϕopen} cut angle ϕopen facing the view point{"CenterCutSphere",ϕopen,ϕcenter} cut angle ϕopen with center angle ϕcenter in 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-10surfaceregion a two-dimensional region in 3D, e.g. Hyperplanevolumeregion 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:
-
- SliceDensityPlot3D has the same options as Graphics3D , with the following additions and changes: [List of all options]
-
PlotPoints Automatic initial number of samples for the function f and slice surfaces surfi in each direction
- 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 density values{sx,sy,sz} scale x, y and z axes{sx,sy,sz,sf} scale x, y and z axes and f density 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
-
ImageMargins 0. the margins to leave around the graphicPlotPoints Automatic initial number of samples for the function f and slice surfaces surfi in each directionPreserveImageOptions Automatic whether to preserve image options when displaying new versions of the same graphicRotationAction "Fit" how to render after interactive rotation
List of all options
Examples
open all close allBasic Examples (2)
Plot the density of on coordinate planes through the center of the plot range:
Plot the density on the surface :
Scope (21)
Surfaces (9)
Generate a density plot over standard slice surfaces:
Standard axis-aligned stacked slice surfaces:
Standard boundary surfaces:
Plot the densities over any surface region:
Plotting over a volume primitive is equivalent to plotting over RegionBoundary [reg]:
Plot the densities over the surface :
Plot the densities over multiple surfaces:
Specify the number of stack planes:
Specify the cutting angle for a center-cut sphere slice:
Sampling (3)
Areas where the function becomes nonreal are excluded:
Use RegionFunction to expose obscured slices:
The domain may be specified by a region including Cone :
A formula region including ImplicitRegion :
A mesh-based region including BoundaryMeshRegion :
Presentation (9)
Use PlotTheme to immediately get overall styling:
Use PlotLegends to get a color bar for the different values:
Control the display of axes with Axes :
Label axes using AxesLabel and the whole plot using PlotLabel :
Color the plot by the function values with ColorFunction :
Style the slice surface boundaries with BoundaryStyle :
TargetUnits specifies which units to use in the visualization:
Create a plot with a log-scaled axis:
Reverse the coordinate direction in the direction:
Options (61)
Axes (3)
AxesLabel (4)
No axes labels are drawn by default:
Label the axis:
Use specific labels for each axis:
Use labels based on variables specified in SliceDensityPlot3D :
AxesOrigin (2)
The position of the axes is determined automatically:
Specify an explicit origin for the axes:
AxesStyle (3)
Change the style for the axes:
Specify the style of each axis:
Use different styles for the ticks and the axes:
BoundaryStyle (1)
Style the slice surface boundaries:
BoxRatios (3)
ClippingStyle (2)
Color clipped regions:
Remove clipped regions with None :
ColorFunction (3)
Color the slice surfaces according to the density values :
Use a named color gradient available in ColorData :
Use red when :
ColorFunctionScaling (2)
By default, scaled values are used:
Use ColorFunctionScaling False to get access to unscaled f values:
ImageSize (7)
Use named sizes such as Tiny , Small , Medium and Large :
Specify the width of the plot:
Specify the height of the plot:
Allow the width and height to be up to a certain size:
Specify the width and height for a graphic, padding with space if necessary:
Setting AspectRatio Full will fill the available space:
Use maximum sizes for the width and height:
Use ImageSize Full to fill the available space in an object:
Specify the image size as a fraction of the available space:
PerformanceGoal (2)
Generate a higher-quality plot:
Emphasize performance, possibly at the cost of quality:
PlotLegends (3)
Show a legend for the densities:
PlotLegends automatically matches the color function:
Control placement of the legend with Placed :
PlotPoints (1)
Use PlotPoints to determine sampling of slice surfaces:
PlotRange (3)
Show All contours by default:
Show a select range:
Show only function values between 0 and 2:
Or with the fully qualified specification:
PlotTheme (3)
Use a theme with detailed grid lines, ticks, and legends:
Any option setting overrides PlotTheme settings, in this case removing face grids:
Compare different plot themes:
RegionFunction (2)
Include only the contours where or :
Include only the contours where :
ScalingFunctions (5)
By default, plots have linear scales in all directions:
Create a plot with a log-scaled axis:
Use ScalingFunctions to scale to reverse the coordinate direction in the direction:
Use a scale defined by a function and its inverse:
Slice surfaces that are defined relative to the bounding box are unaffected by scaling functions:
TargetUnits (2)
Axes and legends are labeled with the units specified by TargetUnits :
Units specified by Quantity are converted to those specified by TargetUnits :
Ticks (6)
Ticks are placed automatically in each plot:
Use Ticks None to not draw any tick marks:
Place tick marks at specific positions:
Draw tick marks at the specified positions with the specified labels:
Specify tick marks with scaled lengths:
Customize each tick with position, length, labeling and styling:
TicksStyle (3)
By default, the ticks and tick labels use the same styles as the axis:
Specify overall ticks style, including the tick labels:
Specify tick style for each of the axes:
WorkingPrecision (1)
Evaluate functions using machine-precision arithmetic:
Applications (16)
Elementary Functions (4)
Plot the function :
Plot the functions and :
Plot the functions and :
Plot the functions and :
Plot the functions and :
Plot the functions and :
Plot , a product of univariate functions:
Plot and , univariate and bivariate functions:
Plot , a trivariate function:
Plot a sum of exponentials sum_ialpha_i exp(-TemplateBox[{{p, -, {p, _, i}}}, Norm]^2):
Pick the points randomly in a box:
Compare with other ways of visualizing:
Show them together:
Distribution Functions (5)
Plot the PDF of a distribution:
Simulate the distribution and show point distribution:
Plot the CDF of a distribution:
The SurvivalFunction :
The HazardFunction :
Explore Correlation parameters for a MultinormalDistribution , where ρab is the correlation between a and b:
Correlation between x and y only:
Use planes given by the covariance matrix:
Visualize the PDF of a ProductDistribution :
A product of three different distributions:
Visualize the PDF of a kernel density estimate of some trivariate data, where density > 0.01:
Potential and Wave Functions (4)
Plot the phase using color on the isosurface of a quadrupole potential:
Alternatively, show the 17<=TemplateBox[{f}, Abs]<=140 on several planes:
Plot spherical waves cos(omega TemplateBox[{{p, -, {p, _, i}}}, Norm]) from three sources in space:
Plot hydrogen orbital densities for quantum numbers , , :
Plot on a surface:
Plot :
An electrostatic potential built from a collection of point charges at positions :
Two charges and :
Plot iso charge surfaces:
Show them together:
Partial Differential Equations (3)
Visualize a nonlinear sine-Gordon equation in two spatial dimensions with periodic boundary conditions, with time represented along the axis:
The solution evolves in time along the axis:
Visualize Wolfram's nonlinear wave equation in two spatial dimensions, with time represented along the axis:
Visualize solutions to 3D partial differential equations. In this case, a Poisson equation over a Ball and Dirichlet boundary conditions:
Properties & Relations (5)
Use SliceContourPlot3D for contours on surfaces:
Use ContourPlot3D for constant value surfaces:
Use DensityPlot3D for full volume visualization of the function values:
Use ListSliceDensityPlot3D for data:
Use DensityPlot for density plots in 2D:
Possible Issues (1)
Slice surfaces with a constant value may appear noisy:
The function is constant on the chosen slice surface:
Choosing a different slice surface gives a reasonable picture of the function:
Related Guides
Text
Wolfram Research (2015), SliceDensityPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/SliceDensityPlot3D.html (updated 2022).
CMS
Wolfram Language. 2015. "SliceDensityPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/SliceDensityPlot3D.html.
APA
Wolfram Language. (2015). SliceDensityPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/SliceDensityPlot3D.html
BibTeX
@misc{reference.wolfram_2025_slicedensityplot3d, author="Wolfram Research", title="{SliceDensityPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/SliceDensityPlot3D.html}", note=[Accessed: 18-November-2025]}
BibLaTeX
@online{reference.wolfram_2025_slicedensityplot3d, organization={Wolfram Research}, title={SliceDensityPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/SliceDensityPlot3D.html}, note=[Accessed: 18-November-2025]}