WOLFRAM

Enable JavaScript to interact with content and submit forms on Wolfram websites. Learn how
Wolfram Language & System Documentation Center

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

makes a density plot of f as a function of x, y, and z.

DensityPlot3D [f,{x,y,z}reg]

takes the variables to be in the geometric region reg.

Details and Options
Details and Options Details and Options
Examples  
Basic Examples  
Scope  
Sampling  
Presentation  
Options  
Axes  
AxesLabel  
AxesOrigin  
Show More Show More
AxesStyle  
BoxRatios  
ClipPlanes  
ColorFunction  
ColorFunctionScaling  
ImageSize  
OpacityFunction  
OpacityFunctionScaling  
PerformanceGoal  
PlotLegends  
PlotPoints  
PlotRange  
PlotTheme  
RegionFunction  
ScalingFunctions  
TargetUnits  
Ticks  
TicksStyle  
WorkingPrecision  
Applications  
Elementary Functions  
Distribution Functions  
Partial Differential Equations  
Potential and Wave Functions  
Properties & Relations  
See Also
Related Guides
History
Cite this Page

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

makes a density plot of f as a function of x, y, and z.

DensityPlot3D [f,{x,y,z}reg]

takes the variables to be in the geometric region reg.

Details and Options

Examples

open all close all

Basic Examples  (3)

Plot a 3D function:

Plot a function over a ball:

Use a different color scheme and legend:

Scope  (13)

Sampling  (6)

Areas where the function becomes nonreal are excluded:

Use PlotPoints to control sampling:

The domain may be specified by a region including Cone :

A formula region including ImplicitRegion :

A mesh-based region including BoundaryMeshRegion :

Use PlotRange to limit ranges to expose more detail:

Use ClipPlanes to specify one or several clipping planes. In this case, clip :

Use RegionFunction to constrain point inclusion more generally:

Presentation  (7)

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 :

TargetUnits specifies which units to use in the visualization:

Use a log scale for the axis:

Reverse the axis so that values increase as they go down:

Options  (69)

Axes  (4)

By default, axes are drawn for DensityPlot3D :

Use Axes False to turn off axes:

Use AxesOrigin to specify where the axes intersect:

Turn each axis on individually:

AxesLabel  (4)

No axes labels are drawn by default:

Place a label on the axis:

Specify axes labels:

Use labels based on variables specified in DensityPlot3D :

AxesOrigin  (2)

The position of the axes is determined automatically:

Specify an explicit origin for the axes:

AxesStyle  (4)

Change the style for the axes:

Specify the style of each axis:

Use different styles for the ticks and the axes:

Use different styles for the labels and the axes:

BoxRatios  (2)

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

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

ClipPlanes  (3)

Use ClipPlanes to specify one or several clipping planes. In this case, clip :

Specify several clip planes, in this case clipping and :

Compare to the general RegionFunction :

ColorFunction  (1)

Color the function according to the x, y, z, or f values:

ColorFunctionScaling  (2)

Parameters to ColorFunction are normally scaled to be between 0 and 1:

Use unscaled density values by setting ColorFunctionScaling to False :

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:

OpacityFunction  (6)

OpacityFunction is Automatic by default:

Turn off transparency with OpacityFunction None :

Make values in the intervals and more opaque:

Use a constant opacity Opacity [0.05]:

Use the same opacity function as the one used in Image3D :

Use a custom opacity function to specify the opacity for each density value:

OpacityFunctionScaling  (3)

By default, scaled values are used:

Use unscaled density values by setting OpacityFunctionScaling to False :

Specify an unscaled opacity interval:

PerformanceGoal  (2)

Generate a higher-quality plot:

Emphasize performance, possibly at the cost of quality:

PlotLegends  (2)

No legends are used by default:

Use PlotLegends->Automatic to show a legended plot:

PlotPoints  (2)

Use more points to get a smoother density:

Use 2 points in the direction, 4 in the direction, and 8 in the direction:

PlotRange  (3)

Show the density plot over the full , , range:

Use specific ranges to show more detail:

Show only function values between 0 and 1:

Equivalently, the full specification:

PlotTheme  (3)

Use a plot theme:

Option settings override theme settings, in this case removing face grids:

Compare different plot themes:

RegionFunction  (3)

Plot over a ball in , , and :

Show only areas where :

Regions do not have to be connected:

ScalingFunctions  (4)

By default, DensityPlot3D has linear scales in all directions:

Create a plot with a log-scaled axis:

Use ScalingFunctions to reverse the coordinate direction in the direction:

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

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  (17)

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:

Distribution Functions  (6)

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:

Correlation between y and z only:

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

Visualize the PDF of a ProductDistribution :

A product of three different distributions:

A product of bivariate and univariate distributions:

Plot the PDF of a CopulaDistribution :

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

Use ClipPlanes to see through the middle:

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:

A cross-sectional view:

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

A cross-sectional view:

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

Plot it:

Potential and Wave Functions  (4)

Visualize a field of randomly placed charges:

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

Plot an acoustic quadrupole:

Plot hydrogen orbital densities for quantum numbers , , :

Plot :

Properties & Relations  (5)

Use ListDensityPlot3D for data:

Use DensityPlot for density plots in 2D:

Use SliceDensityPlot3D for density plots over slice surfaces:

Use SliceContourPlot3D for contour plots over slice surfaces:

Use ContourPlot3D for constant value surfaces:

Wolfram Research (2015), DensityPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/DensityPlot3D.html (updated 2022).

Text

Wolfram Research (2015), DensityPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/DensityPlot3D.html (updated 2022).

CMS

Wolfram Language. 2015. "DensityPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/DensityPlot3D.html.

APA

Wolfram Language. (2015). DensityPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/DensityPlot3D.html

BibTeX

@misc{reference.wolfram_2025_densityplot3d, author="Wolfram Research", title="{DensityPlot3D}", year="2022", howpublished="\url{https://reference.wolfram.com/language/ref/DensityPlot3D.html}", note=[Accessed: 05-December-2025]}

BibLaTeX

@online{reference.wolfram_2025_densityplot3d, organization={Wolfram Research}, title={DensityPlot3D}, year={2022}, url={https://reference.wolfram.com/language/ref/DensityPlot3D.html}, note=[Accessed: 05-December-2025]}

Top [フレーム]

AltStyle によって変換されたページ (->オリジナル) /