ListDensityPlot3D

ListDensityPlot3D[farr]
generates a smooth density plot from an array of values farr.
ListDensityPlot3D[{{x1,y1,z1,f1},…,{xn,yn,zn,fn}}]
generates a density plot with values fi at the specified points {xi,yi,zi}.
Details and Options




- ListDensityPlot3D is also known as volume map.
- ListDensityPlot3D evaluates the interpolated function
and maps the value to a color and opacity independently.
- The opacity function
is typically used to make some range of values visible, while making some others invisible.
- For regular data, the function
has value farr[[i,j,k]] at
.
- For irregular data,
has value fi at
.
- The plot visualizes the set
where
is a color function,
is an opacity function and the region reg is the Cartesian product
for regular data and the convex hull of {{x1,y1,z1},…,{xn,yn,zn}} for irregular data.
- farr should be an array of real numbers; positions where farr is not a real number are rendered transparently.
- ListDensityPlot3D linearly interpolates values so as to give color changes.
- ListDensityPlot3D is mainly intended for continuous values.
- ListDensityPlot3D has the same options as Graphics3D, with the following additions and changes:
-
Axes True whether to draw axes BoxRatios {1,1,1} bounding 3D box ratios ColorFunction Automatic how to color the plot ColorFunctionScaling True whether to scale the arguments to ColorFunction DataRange Automatic the range for x, y, and z values to assume MaxPlotPoints Automatic the maximum number of points to include OpacityFunction Automatic how to compute the opacity at each point OpacityFunctionScaling True whether to scale the arguments to OpacityFunction PerformanceGoal $PerformanceGoal aspects of performance to optimize PlotLegends None legends for color gradients 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 - ColorFunction and OpacityFunction are supplied with a single argument, given by default by the scaled value of f.
- Typical settings for OpacityFunction include:
-
Automatic automatically determined None no opacity function, fully opaque α constant opacity Opacity[α] Interval[…] make values in the interval more opaque "Image3D" default opacity function used in Image3D func general opacity function - The arguments supplied to RegionFunction are x, y, z, and f.
- The setting DataRange->{{xmin,xmax},{ymin,ymax},{zmin,zmax}} specifies the ranges for x, y, and z coordinates to assume when given an array of f values only as input.
- For an farr of dimension {r,s,t}, the setting DataRangeAutomatic is equivalent to DataRange{{1,r},{1,s},{1,t}}.
- Possible settings for ScalingFunctions include:
-
{sx,sy,sz} scale x, y and z axes - 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

Examples
open allclose allBasic Examples (2)
Scope (15)
Data (7)
For regular data consisting of values, the
,
, and
data reflects its positions in the array:
Provide explicit ,
, and
data ranges by using DataRange:
Give explicit ,
,
,
coordinates for points in a density:
For irregular data , the
,
, and
data ranges are inferred from data:
Use RegionFunction to constrain data inclusion more generally:
Plot the density for an array of values given by SparseArray:
Plot the density for an array of values given by QuantityArray:
Use ClipPlanes to specify one or several clipping planes. In this case, clip :
Presentation (8)
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:
Use a custom opacity function to specify the opacity for each point volume:
TargetUnits specifies which units to use in the visualization:
Use ScalingFunctions in the x direction:
Options (38)
BoxRatios (3)
ClipPlanes (3)
Use ClipPlanes to specify a clipping plane. In this case, clip :
Specify several clip planes, in this case clipping and
:
Compare to the general RegionFunction:
ColorFunction (2)
ColorFunctionScaling (2)
Parameters to ColorFunction are normally scaled to be between 0 and 1:
Use unscaled coordinates by setting ColorFunctionScaling to False:
DataRange (2)
OpacityFunction (5)
OpacityFunction is Automatic by default:
Use None to make the whole volume opaque:
Use a custom opacity function to specify the opacity for each point volume:
Make values in the intervals and
more opaque:
Use a constant opacity Opacity[0.05]:
OpacityFunctionScaling (2)
By default, scaled values are used:
Use unscaled density values by setting OpacityFunctionScaling to False:
PerformanceGoal (2)
PlotLegends (2)
PlotRange (3)
PlotTheme (3)
RegionFunction (3)
ScalingFunctions (4)
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:
Applications (13)
Elementary Functions (4)
Simulation Data (6)
Plot a probability density function of three variables:
Simulate the distribution and compute the bin counts:
Simulate a random walk and show the path:
Bin the position that the walk hits in space and show the density:
Plot the evolution of two-dimensional cellular automata:
Generate a Menger sponge array:
Plot the evolution of a substitution system:
Simulate a discrete diffusion model of a two-dimensional array of random values by averaging values of a radius-1 neighborhood in the array:
Data Patterns (3)
Visualize the phase for a 3D discrete Fourier transform on data:
Bin the position of atoms in a protein and show the density:
Compare with the molecule plot:
Visualize MRI data from a brain:
To get the same orientation used by Image3D, use the option DataReversed:
Properties & Relations (6)
Use ListSliceDensityPlot3D for density plots over slice surfaces:
Use ListDensityPlot for density plots in 2D:
Use DensityPlot3D for functions:
Use ListSliceContourPlot3D for contours over slice surfaces:
Use ListContourPlot3D for constant value surfaces:
Use ArrayPlot3D for discrete data:
Text
Wolfram Research (2015), ListDensityPlot3D, Wolfram Language function, https://reference.wolfram.com/language/ref/ListDensityPlot3D.html (updated 2022).
CMS
Wolfram Language. 2015. "ListDensityPlot3D." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2022. https://reference.wolfram.com/language/ref/ListDensityPlot3D.html.
APA
Wolfram Language. (2015). ListDensityPlot3D. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/ListDensityPlot3D.html